working version

Dependencies:   mbed mbed-rtos SimpleDMA FreescaleIAP eeprom

Fork of CDMS_CODE_FM_28JAN2017 by samp Srinivasan

Committer:
aniruddhv
Date:
Thu Mar 24 04:04:33 2016 +0000
Revision:
137:489a93a04d6b
Parent:
12:ffdb29353058
Child:
144:4c20fcc105ce
Updated POWER_ON_TX, POWER_OFF_TX

Who changed what in which revision?

UserRevisionLine numberNew contents of line
aniruddhv 137:489a93a04d6b 1 #define power_on_bae {\
aniruddhv 137:489a93a04d6b 2 /*PENDING*/\
aniruddhv 137:489a93a04d6b 3 }
aniruddhv 137:489a93a04d6b 4
aniruddhv 137:489a93a04d6b 5 #define resume_bcn {\
aniruddhv 137:489a93a04d6b 6 Base_tc *beacon_tc = new Short_tc;\
aniruddhv 137:489a93a04d6b 7 beacon_tc->next_TC = NULL;\
aniruddhv 137:489a93a04d6b 8 PUTshort_or_long(beacon_tc,0);\
aniruddhv 137:489a93a04d6b 9 PUTcrc_pass(beacon_tc,0x1);\
aniruddhv 137:489a93a04d6b 10 PUTexec_status(beacon_tc,0);\
aniruddhv 137:489a93a04d6b 11 beacon_tc->TC_string[0] = 0x01;\
aniruddhv 137:489a93a04d6b 12 beacon_tc->TC_string[1] = 0x41;\
aniruddhv 137:489a93a04d6b 13 beacon_tc->TC_string[2] = 0x65;\
aniruddhv 137:489a93a04d6b 14 beacon_tc->TC_string[3] = 0x11;\
aniruddhv 137:489a93a04d6b 15 beacon_tc->TC_string[4] = 0x00;\
aniruddhv 137:489a93a04d6b 16 beacon_tc->TC_string[5] = 0;\
aniruddhv 137:489a93a04d6b 17 beacon_tc->TC_string[6] = 0;\
aniruddhv 137:489a93a04d6b 18 beacon_tc->TC_string[7] = 0;\
aniruddhv 137:489a93a04d6b 19 beacon_tc->TC_string[8] = 0x01;\
aniruddhv 137:489a93a04d6b 20 uint16_t crc16 = crc16_gen(beacon_tc->TC_string, 9);\
aniruddhv 137:489a93a04d6b 21 beacon_tc->TC_string[9] = (crc16 & 0xFF00)>>8;\
aniruddhv 137:489a93a04d6b 22 beacon_tc->TC_string[10] = (crc16 & 0x00FF);\
aniruddhv 137:489a93a04d6b 23 Base_tm *tm_ptr = new Short_tm;\
aniruddhv 137:489a93a04d6b 24 tm_ptr = FCTN_CDMS_RLY_TMTC(beacon_tc);\
aniruddhv 137:489a93a04d6b 25 }
aniruddhv 137:489a93a04d6b 26
shreeshas95 4:104dd82c99b8 27 #define COM_POWER_OFF_TX {\
aniruddhv 12:ffdb29353058 28 /*gPC.puts("Inside COM_POWER_OFF_TX\r\n");*/\
shreeshas95 4:104dd82c99b8 29 /*PENDING: POWER OFF TRANSMITTER*/\
aniruddhv 137:489a93a04d6b 30 /*power_on_com_tx_pin = 0;*/\
shreeshas95 4:104dd82c99b8 31 RX1M.attach(&rx_read, Serial::RxIrq);\
shreeshas95 4:104dd82c99b8 32 gFLAGS = gFLAGS & (~COM_MNG_TMTC_RUNNING_FLAG);\
shreeshas95 4:104dd82c99b8 33 /*PENDING: SWITCH RF RELAY TO BEACON*/\
aniruddhv 137:489a93a04d6b 34 gFLAGS = gFLAGS | RF_SW_STATUS_FLAG;\
aniruddhv 137:489a93a04d6b 35 if( gFLAGS & COM_AUTO_POWER_OFF_BAE_FLAG ){\
aniruddhv 137:489a93a04d6b 36 power_on_bae;\
aniruddhv 137:489a93a04d6b 37 gFLAGS = gFLAGS | BAE_SW_EN_FLAG;\
aniruddhv 137:489a93a04d6b 38 gFLAGS & (~COM_AUTO_POWER_OFF_BAE_FLAG);\
aniruddhv 137:489a93a04d6b 39 resume_bcn;\
aniruddhv 137:489a93a04d6b 40 }\
aniruddhv 137:489a93a04d6b 41 else{\
aniruddhv 137:489a93a04d6b 42 if( gFLAGS & BAE_SW_EN_FLAG ){\
aniruddhv 137:489a93a04d6b 43 resume_bcn;\
aniruddhv 137:489a93a04d6b 44 }\
aniruddhv 137:489a93a04d6b 45 }\
shreeshas95 4:104dd82c99b8 46 gFLAGS = gFLAGS & (~COM_PA_HOT_FLAG);\
shreeshas95 4:104dd82c99b8 47 gCOM_PA_COOLING_TIMEOUT.detach();\
shreeshas95 4:104dd82c99b8 48 gFLAGS = gFLAGS & (~COM_TX_FLAG);\
aniruddhv 137:489a93a04d6b 49 gFLAGS = gFLAGS & (~COM_SESSION_TIMEOUT_FLAG);\
aniruddhv 137:489a93a04d6b 50 /*gPC.puts("completed com_power_off tx\r\n");*/\
shreeshas95 4:104dd82c99b8 51 }