# HG changeset patch # User Michael Spacefalcon # Date 1406933625 0 # Node ID bc3656cfe0d82cf5f69d70c32f2f93c14d7c12d6 # Parent d9fd344d75708d1e4c8c1c1507b718f5ad909ab7 gsm-fw/L1/include: l1_const.h reconciled diff -r d9fd344d7570 -r bc3656cfe0d8 gsm-fw/L1/include/l1_const.h --- a/gsm-fw/L1/include/l1_const.h Fri Aug 01 18:07:16 2014 +0000 +++ b/gsm-fw/L1/include/l1_const.h Fri Aug 01 22:53:45 2014 +0000 @@ -20,11 +20,13 @@ #else // Running ARM compiler. #define FAR #define EXIT exit(0) + #undef stricmp // appease gcc #define stricmp strcmp #endif #if (CODE_VERSION != SIMULATION) + #undef NULL // appease gcc #define NULL 0 #endif @@ -73,7 +75,10 @@ #define MAX_BAD_GAUGING 3 // GAUG_IN_32T = (HF in clock of 13Mhz*dpll) * ( LF in Khz) -#define GAUG_IN_32T 605 // gauging duration is 1348*T32 measured on eva4 +// Leonardo version had it set to 1348, but TCS3.2 (LoCosto) has it set +// to 605 instead. I'll revert it to the Leonardo value for now. +// -- Space Falcon +#define GAUG_IN_32T 1348 // gauging duration is 1348*T32 measured on eva4 // DSP state need to be used to enter Deep Sleep mode #if (W_A_DSP_IDLE3 == 1) @@ -170,7 +175,7 @@ #elif ((CHIPSET == 5) || (CHIPSET == 6) || (CHIPSET == 7) || (CHIPSET == 8) || (CHIPSET == 9) || (CHIPSET == 10) || (CHIPSET == 11) || (CHIPSET == 12) || (CHIPSET == 15)) - #if (DSP == 33) || (DSP == 34) || (DSP == 35) || (DSP == 36) || (DSP == 37) || (DSP == 38) || (DSP == 39) + #if (DSP >= 33) // DSP code 33: upto 8 PMs with GSM and GPRS scheduler @@ -437,21 +442,21 @@ // DSP vocoder Enable/ Disable //--------------------------------- #if (FF_L1_TCH_VOCODER_CONTROL == 1) - #if (L1_VOCODER_IF_CHANGE == 0) - #define TCH_VOCODER_DISABLE_REQ 0 - #define TCH_VOCODER_ENABLE_REQ 1 - #define TCH_VOCODER_ENABLED 2 - #define TCH_VOCODER_DISABLED 3 -#else - #define TCH_VOCODER_RESET_COMMAND 0 - #define TCH_VOCODER_ENABLE_COMMAND 1 - #define TCH_VOCODER_DISABLE_COMMAND 2 -#endif // L1_VOCODER_IF_CHANGE == 0 + #if (L1_VOCODER_IF_CHANGE == 0) + #define TCH_VOCODER_DISABLE_REQ 0 + #define TCH_VOCODER_ENABLE_REQ 1 + #define TCH_VOCODER_ENABLED 2 + #define TCH_VOCODER_DISABLED 3 + #else + #define TCH_VOCODER_RESET_COMMAND 0 + #define TCH_VOCODER_ENABLE_COMMAND 1 + #define TCH_VOCODER_DISABLE_COMMAND 2 + #endif // L1_VOCODER_IF_CHANGE == 0 - #if (W_A_WAIT_DSP_RESTART_AFTER_VOCODER_ENABLE ==1) - // Number of TDMA wait frames until the DSP output is steady - #define DSP_VOCODER_ON_TRANSITION 165 - #endif + #if (W_A_WAIT_DSP_RESTART_AFTER_VOCODER_ENABLE ==1) + // Number of TDMA wait frames until the DSP output is steady + #define DSP_VOCODER_ON_TRANSITION 165 + #endif #endif // FF_L1_TCH_VOCODER_CONTROL #endif // W_A_DSP_PR20037 @@ -496,6 +501,7 @@ #define AFC_INIT_MIN 6 #endif +#if 0 // For Locosto #define L1_AFC_MANUAL_MODE 0 #define L1_AFC_SCRIPT_MODE 1 @@ -507,8 +513,8 @@ #define L1_IL_INVALID 0 #define L1_IL_VALID 1 - // End Locosto +#endif //--------------------------------- // TOA control defines. @@ -1263,7 +1269,7 @@ #define TCH_LOOP_A 31 #define TCH_LOOP_B 32 -#if (DSP == 33) || (DSP == 34) || (DSP == 35) || (DSP == 36) || (DSP == 37) || (DSP == 38) || (DSP == 39) +#if (DSP >= 33) #define SC_CHKSUM_VER (DB_W_PAGE_0 + (2 * (0x08DB - 0x800))) #else #define SC_CHKSUM_VER (DB_W_PAGE_0 + (2 * (0x09A0 - 0x800))) @@ -1323,7 +1329,7 @@ #define D_MD_MAX_THR_TCHFS 1700L //(2000L *C_POND_RED) #define D_MD1_MAX_THR_TCHFS 99L //(160L *C_POND_RED) -#if (DSP == 33) || (DSP == 34) || (DSP == 35) || (DSP == 36) || (DSP == 37) || (DSP == 38)|| (DSP == 39) +#if (DSP >= 33) // Frequency burst definitions #define D_FB_MARGIN_BEG 24 #define D_FB_MARGIN_END 22 @@ -1335,7 +1341,7 @@ #define D_V42B_RESET_DELAY 10L // Latencies definitions - #if (DSP == 33) || (DSP == 34) || (DSP == 35) || (DSP == 36) || (DSP == 37) || (DSP == 38) || (DSP == 39) + #if (DSP >= 33) // C.f. BUG1404 #define D_LAT_MCU_BRIDGE 0x000FL #else @@ -1430,12 +1436,12 @@ #define D_TI_VERSION 0 -/*------------------------------------------------------------------------------*/ -/* */ -/* DEFINITIONS FOR DSP <-> MCU COMMUNICATION. */ -/* ++++++++++++++++++++++++++++++++++++++++++ */ -/* */ -/*------------------------------------------------------------------------------*/ +/*----------------------------------------------------------------------------*/ +/* */ +/* DEFINITIONS FOR DSP <-> MCU COMMUNICATION. */ +/* ++++++++++++++++++++++++++++++++++++++++++ */ +/* */ +/*----------------------------------------------------------------------------*/ // COMMUNICATION Interrupt definition //------------------------------------ #define ALL_16BIT 0xffffL @@ -1676,7 +1682,7 @@ #define DB_SIZE (4*20L) // 4 pages of 20 words... - #if (DSP == 33) || (DSP == 34) || (DSP == 35) || (DSP == 36) || (DSP == 37) || (DSP == 38) || (DSP == 39) + #if (DSP >= 33) #define MCU_API_BASE_ADDRESS 0xFFD00000L #define DSP_API_BASE_ADDRESS 0x800 #define DB_W_PAGE_0 0xFFD00000L // DB page 0 write : 20 words long