FreeCalypso > hg > tcs211-l1-reconst
changeset 165:4e72d69319d6
dl1_com.c: beginning of reconstruction
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 07 Jun 2016 05:43:40 +0000 |
parents | 10fc1fb079d7 |
children | 5bad5a0bdec2 |
files | chipsetsw/layer1/dl1/dl1_com.c g23m/objdiff/l1_int/disasm-list |
diffstat | 2 files changed, 40 insertions(+), 42 deletions(-) [+] |
line wrap: on
line diff
--- a/chipsetsw/layer1/dl1/dl1_com.c Tue Jun 07 04:59:26 2016 +0000 +++ b/chipsetsw/layer1/dl1/dl1_com.c Tue Jun 07 05:43:40 2016 +0000 @@ -10,17 +10,15 @@ * guided by the disassembly of dl1_com.obj from the Leonardo version. */ -#include "config.h" -#include "sys_types.h" -#include "../../riviera/rv/general.h" -#include "../../nucleus/nucleus.h" - /* Include Files */ -#include <ctype.h> +#include <assert.h> #include <stdarg.h> +#include <stdio.h> #include <stdlib.h> #include <string.h> +#include "nucleus.h" + #include "l1_types.h" #include "l1_confg.h" #include "l1_const.h" @@ -59,24 +57,13 @@ #include "l1_defty.h" #endif -#include "../../bsp/armio.h" -#include "../../bsp/timer.h" - -#include "../../bsp/iq.h" -#include "../../bsp/mem.h" -#include "../../bsp/clkm.h" -#include "../../bsp/inth.h" +#include "armio.h" +#include "timer.h" -/* - * The function that sets up the HISRs has an assert() macro call in it. - * The Leonardo version was built with the TMS470 compiler's C library - * version of assert() in it, which is not very useful. Here I am - * pulling in some GPF/VSI headers so we get the more useful GPF/VSI - * version of assert() instead. - */ -#include "../../gpf/inc/typedefs.h" -#include "../../gpf/inc/vsi.h" -#include "../../gpf/inc/cust_os.h" +#include "iq.h" +#include "mem.h" +#include "clkm.h" +#include "inth.h" /* * Timing monitor @@ -95,22 +82,21 @@ #endif #endif -#define STACK_SECTION __attribute__ ((section ("int.ram"))) - #if (L1_EXT_AUDIO_MGT == 1) NU_HISR EXT_AUDIO_MGT_hisr; - char FAR ext_audio_mgt_hisr_stack[500] STACK_SECTION; + char FAR ext_audio_mgt_hisr_stack[500]; extern void Cust_ext_audio_mgt_hisr(void); #endif #if ( (L1_MP3 == 1) || (L1_MIDI == 1) || (L1_AAC == 1) || (L1_DYN_DSP_DWNLD == 1) ) // equivalent to an API_HISR flag extern void api_hisr(void); - char FAR API_HISR_stack[0x400] STACK_SECTION; + #pragma DATA_SECTION (API_HISR_stack,"API_HISR_stack"); + char FAR API_HISR_stack[0x400]; NU_HISR apiHISR; #endif // (L1_MP3 == 1) || (L1_MIDI == 1) || (L1_DYN_DSP_DWNLD == 1) #if (FF_L1_IT_DSP_USF == 1) || (FF_L1_IT_DSP_DTX == 1) - char FAR API_MODEM_HISR_stack[0x400] STACK_SECTION; // stack size to be tuned + char FAR API_MODEM_HISR_stack[0x400]; // stack size to be tuned NU_HISR api_modemHISR; #endif // FF_L1_IT_DSP_USF @@ -119,7 +105,7 @@ */ #if (OP_L1_STANDALONE == 0) #define LAYER_1_SYNC_STACK_SIZE 4000 /* matching Leonardo version */ - unsigned char layer_1_sync_stack[LAYER_1_SYNC_STACK_SIZE] STACK_SECTION; + unsigned char layer_1_sync_stack[LAYER_1_SYNC_STACK_SIZE]; #else #if TESTMODE char FAR layer_1_sync_stack[2600 /*3600*/]; // Frame interrupt task stack for EVA3 @@ -134,17 +120,11 @@ void layer_1_sync_HISR_entry (void); /* - * l1_create_HISR + * l1_create_ISR * * Create L1 HISR. This function is called from l1_pei. - * - * Apparently this function was originally called l1_create_ISR(), - * as that is how it appears in the Leonardo dl1_com.obj module. - * The LoCosto version originally had an l1_create_ISR() wrapper - * that simply calls l1_create_HISR(), but I plan on changing - * l1_pei to call l1_create_HISR() instead. -- Space Falcon */ -void l1_create_HISR (void) +void l1_create_ISR (void) { STATUS status; @@ -204,12 +184,16 @@ /* * The versions of TP_FrameIntHandler() and layer_1_sync_HISR_entry() - * in the Leonardo dl1_com.obj module contain CPU load measurement - * code, but in the LoCosto version of L1 which we are using this - * functionality has been moved into L1S proper, i.e., inside the - * hisr() function. + * in the TCS211 dl1_com.obj module contain CPU load measurement + * code. TI changed things for LoCosto, so we have to revert their + * changes and restore the TCS211 way. */ +#if (TRACE_TYPE == 4) + #define TIMER_RESET_VALUE (0xFFFF) + #define TICKS_PER_TDMA (1875) +#endif + /*-------------------------------------------------------*/ /* TP_FrameIntHandler() Low Interrupt service routine */ /*-------------------------------------------------------*/ @@ -241,7 +225,7 @@ #else - #if (TRACE_TYPE == 4) && (TI_NUC_MONITOR != 1) && (WCP_PROF == 1) + #if (TRACE_TYPE == 4) && (TI_NUC_MONITOR != 1) TM_ResetTimer (2, TIMER_RESET_VALUE, 1, 0); TM_StartTimer (2); #endif @@ -280,3 +264,16 @@ // Call Synchronous Layer1 hisr(); } + +/* the following stub functions live in the dl1_com module per TCS211 */ + +void rx_tch_data (API *data_address, + UWORD8 channel_mode, + UWORD8 blk_seq_number) +{ +} + +UWORD8 *tx_tch_data (void) +{ + return(NULL); +}