FreeCalypso > hg > tcs211-l1-reconst
comparison chipsetsw/layer1/audio_cfile/l1audio_init.c @ 182:6a71281f0d82
l1audio_init.c fully reconstructed, matches TCS211 object
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Wed, 08 Jun 2016 00:41:23 +0000 |
parents | 3c9aaec4eb88 |
children |
comparison
equal
deleted
inserted
replaced
181:3c9aaec4eb88 | 182:6a71281f0d82 |
---|---|
169 /*-------------------------------------------------------*/ | 169 /*-------------------------------------------------------*/ |
170 void l1audio_dsp_init(void) | 170 void l1audio_dsp_init(void) |
171 { | 171 { |
172 UWORD8 i, j; | 172 UWORD8 i, j; |
173 | 173 |
174 //----------------------------------- | |
175 // AUDIO control words initialization | |
176 //----------------------------------- | |
177 l1s_dsp_com.dsp_ndb_ptr->d_toneskb_init = 0; // MCU/DSP audio task com. register | |
178 l1s_dsp_com.dsp_ndb_ptr->d_toneskb_status = 0; // MCU/DSP audio task com. register | |
179 | |
174 #if (KEYBEEP) | 180 #if (KEYBEEP) |
175 l1s_dsp_com.dsp_ndb_ptr->d_k_x1_kt0 = 0; // keybeep variable | 181 l1s_dsp_com.dsp_ndb_ptr->d_k_x1_kt0 = 0; // keybeep variable |
176 l1s_dsp_com.dsp_ndb_ptr->d_k_x1_kt1 = 0; // keybeep variable | 182 l1s_dsp_com.dsp_ndb_ptr->d_k_x1_kt1 = 0; // keybeep variable |
177 l1s_dsp_com.dsp_ndb_ptr->d_dur_kb = 0; // keybeep variable | 183 l1s_dsp_com.dsp_ndb_ptr->d_dur_kb = 0; // keybeep variable |
178 #endif | 184 #endif |
330 for (i=0; i<(SC_AUDIO_MELODY_E2_MAX_NUMBER_OF_INSTRUMENT); i++) | 336 for (i=0; i<(SC_AUDIO_MELODY_E2_MAX_NUMBER_OF_INSTRUMENT); i++) |
331 { | 337 { |
332 l1s_dsp_com.dsp_ndb_ptr->a_melody_e2_instrument_ptr[i] = 0x0000; | 338 l1s_dsp_com.dsp_ndb_ptr->a_melody_e2_instrument_ptr[i] = 0x0000; |
333 } | 339 } |
334 | 340 |
341 /* FreeCalypso: reconstructed from disassembly of TCS211 object */ | |
342 l1s_dsp_com.dsp_ndb_ptr->d_melody_e2_deltatime = 0; | |
343 | |
335 // Reset the flag to know if the DSP melody E2 task runs | 344 // Reset the flag to know if the DSP melody E2 task runs |
336 l1s.melody_e2.dsp_task = FALSE; | 345 l1s.melody_e2.dsp_task = FALSE; |
337 #endif // MELODY_E2 | 346 #endif // MELODY_E2 |
338 | 347 |
339 #if ((DSP==33) || (DSP == 34) || (DSP==35) || (DSP==36) || (DSP == 37) || (DSP == 38) || (DSP == 39)) | 348 #if ((DSP==33) || (DSP == 34) || (DSP==35) || (DSP==36) || (DSP == 37) || (DSP == 38) || (DSP == 39)) |
340 // Linked to E2 melody | 349 // Linked to E2 melody |
341 // In case of WCP, there is a WCP variable at this address | 350 // In case of WCP, there is a WCP variable at this address |
342 l1s_dsp_com.dsp_ndb_ptr->d_melody_selection = NO_MELODY_SELECTED; | 351 l1s_dsp_com.dsp_ndb_ptr->d_melody_selection = NO_MELODY_SELECTED; |
343 #endif | 352 #endif |
344 | |
345 //----------------------------------- | |
346 // AUDIO control words initialization | |
347 //----------------------------------- | |
348 l1s_dsp_com.dsp_ndb_ptr->d_toneskb_init = 0; // MCU/DSP audio task com. register | |
349 l1s_dsp_com.dsp_ndb_ptr->d_toneskb_status = 0; // MCU/DSP audio task com. register | |
350 | 353 |
351 | 354 |
352 #if ((CHIPSET == 4) || (CHIPSET == 12) || (CHIPSET == 15) || ((CHIPSET==10) && (OP_WCP==1))) && ((DSP == 36) || (DSP == 37) || (DSP == 38) || (DSP == 39)) | 355 #if ((CHIPSET == 4) || (CHIPSET == 12) || (CHIPSET == 15) || ((CHIPSET==10) && (OP_WCP==1))) && ((DSP == 36) || (DSP == 37) || (DSP == 38) || (DSP == 39)) |
353 l1s_dsp_com.dsp_ndb_ptr->d_es_ctrl = 0; // ES control | 356 l1s_dsp_com.dsp_ndb_ptr->d_es_ctrl = 0; // ES control |
354 l1s_dsp_com.dsp_ndb_ptr->d_anr_ul_ctrl = 0; // ANR control | 357 l1s_dsp_com.dsp_ndb_ptr->d_anr_ul_ctrl = 0; // ANR control |