FreeCalypso > hg > freecalypso-sw
changeset 644:1199cdf99c32
SIM integration: sim32.c compiles
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Wed, 03 Sep 2014 20:29:54 +0000 |
parents | d779078abe40 |
children | 14826aa2db26 |
files | gsm-fw/bsp/Makefile gsm-fw/bsp/sim32.c |
diffstat | 2 files changed, 18 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/gsm-fw/bsp/Makefile Wed Sep 03 17:50:06 2014 +0000 +++ b/gsm-fw/bsp/Makefile Wed Sep 03 20:29:54 2014 +0000 @@ -3,9 +3,15 @@ ASFLAGS=-mthumb-interwork LD= arm-elf-ld +sinclude ../include/config.mk + IOBJS= irq_twiddle.o niq32.o +XTOBJS= armio.o clkm.o init_target.o inth.o niq.o timer.o timer1.o timer2.o -XTOBJS= armio.o clkm.o init_target.o inth.o niq.o timer.o timer1.o timer2.o +ifeq (${CONFIG_INCLUDE_SIM},1) +XTOBJS+=sim.o +IOBJS+= sim32.o +endif XOBJS= ${XTOBJS} oldint.o AOBJS= ${IOBJS} oldint.o
--- a/gsm-fw/bsp/sim32.c Wed Sep 03 17:50:06 2014 +0000 +++ b/gsm-fw/bsp/sim32.c Wed Sep 03 20:29:54 2014 +0000 @@ -11,11 +11,10 @@ #define SIM32_C 1 -#include "chipset.cfg" +#include "../include/config.h" +#include "../include/sys_types.h" -#include "main/sys_types.h" -#include <assert.h> -#include "inth/iq.h" +#include "iq.h" #include "sim.h" @@ -62,8 +61,8 @@ #ifdef SIM_DEBUG_TRACE if ((IQ_FrameCount - SIM_dbg_local_count) > SIM_dbg_tdma_diff) { - SIM_dbg_tdma_diff = IQ_FrameCount - SIM_dbg_local_count; - } + SIM_dbg_tdma_diff = IQ_FrameCount - SIM_dbg_local_count; + } SIM_dbg_local_count = IQ_FrameCount; #endif @@ -163,13 +162,13 @@ } else { - if (p->rx_index == p->expected_data) - { - p->moderx = 5; - } + if (p->rx_index == p->expected_data) + { + p->moderx = 5; + } } break; - + case 5: //mode wait for procedure character except NULL if ((rx != 0x60) || (p->SWcount != 0)) //treat NULL character only if arriving before SW1 SW2 { @@ -182,10 +181,8 @@ SIM_dbg_null[2]++; #endif } - + break; - break; - case 6: //give the acknowledge char if (((rx & 0xF0) == 0x60) || ((rx & 0xF0) == 0x90)) {