![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
CDMS_CODE_samp_23SEP_DMA_flag
Dependencies: FreescaleIAP SimpleDMA mbed-rtos mbed
Fork of CDMS_CODE_samp_23SEP_DMA by
Diff: common_functions.h
- Revision:
- 215:570251b23c7b
- Parent:
- 213:867de6d350fa
- Child:
- 216:93505a6f8db7
diff -r 867de6d350fa -r 570251b23c7b common_functions.h --- a/common_functions.h Sun Jul 03 09:26:42 2016 +0000 +++ b/common_functions.h Sun Jul 03 09:47:05 2016 +0000 @@ -77,7 +77,7 @@ }\ }\ else{\ - RESET_CDMS;\ + /*PENDING: reset cdms*/\ break;\ }\ }\ @@ -99,24 +99,18 @@ /*Attach this new node at the end*/\ }\ else{\ - RESET_CDMS;\ + /*PENDING: reset CDMS*/\ break;\ }\ }\ } #define put_crc_l1_ack(tm_ptr) {\ + tm_ptr->TM_string[2] = gTOTAL_CRC_FAIL_TC & 0xFF;\ /*TC LIST STATUS*/\ - tm_ptr->TM_string[3] |= (gMASTER_STATE << 6) & 0xC0;\ + tm_ptr->TM_string[3] |= (gMASTER_STATE << 5) & 0xE0;\ /*PA HOT*/\ if( gFLAGS & COM_PA_HOT_FLAG ){\ - tm_ptr->TM_string[3] |= (1 << 5);\ - }\ - else{\ - tm_ptr->TM_string[3] &= ~(1 << 5);\ - }\ - /*PA OC*/\ - if( gFLAGS & COM_PA_OC_FLAG ){\ tm_ptr->TM_string[3] |= (1 << 4);\ }\ else{\ @@ -130,39 +124,16 @@ #define fill_l1_ack(tm_ptr) {\ tm_ptr->next_TM = NULL;\ tm_ptr->TM_string[0] = TMID_ACK_L1 << 4;\ + /*PENDING: PA TEMPERATURE*/\ tm_ptr->TM_string[1] = gTOTAL_INCORRECT_SIZE_TC & 0xFF;\ tm_ptr->TM_string[2] = gTOTAL_CRC_FAIL_TC & 0xFF;\ } -#define P_COM_HK{\ - uint8_t returnHere;\ - isPAhot(returnHere);\ - if (returnHere == 0xFF)\ - gFLAGS = gFLAGS & ~(COM_PA_HOT_FLAG);\ - else\ - gFLAGS = gFLAGS | COM_PA_HOT_FLAG;\ - if (gFLAGS & COM_PA_OC_FLAG){\ - COM_TX_CNTRL = 1;\ - wait_ms(5);\ - }\ - isPAoc(returnHere);\ - if (returnHere == 0xFF)\ - gFLAGS = gFLAGS & ~(COM_PA_OC_FLAG);\ - else\ - gFLAGS = gFLAGS | COM_PA_OC_FLAG;\ - /*P_CDMS_HANDLE_HW_FAULTS*/\ -} - #define isPAhot(returnHere){\ /*PENDING : COMPLETE THIS FUNCTION*/\ returnHere = 0xFF;\ } -#define isPAoc(returnHere){\ - /*PENDING : COMPLETE THIS FUNCTION*/\ - returnHere = 0xFF;\ -} - #define get_call_sign(tm_ptr) {\ Base_tm* call_sign_tm = new Short_tm;\ call_sign_tm->next_TM = NULL;\ @@ -185,6 +156,7 @@ /*IF CRC PASS*/\ if( (GETcrc_pass(current_TC) == 1) ){\ if(TC_count > 4){\ + /*PENDING: FILL TC_EXEC_CODE, APPEND CRC TO THE TM*/\ put_crc_l1_ack( l1_ack );\ /*extend the TM linked list*/\ TC_count = 0;\ @@ -217,7 +189,7 @@ ++overflowCountL1;\ }\ else{\ - RESET_CDMS;\ + /*PENDING: RESET CDMS*/\ break;\ }\ }\