CDMS code for testing sbc
Dependencies: FreescaleIAP SimpleDMA mbed-rtos mbed
Fork of CDMS_CODE by
Diff: ThreadsAndFunctions.h
- Revision:
- 182:8b73c010286b
- Parent:
- 177:2fa8582896e0
- Child:
- 186:eb19a02f83d6
- Child:
- 189:0636c8391407
--- a/ThreadsAndFunctions.h Sun May 29 07:01:53 2016 +0000 +++ b/ThreadsAndFunctions.h Sat Jun 04 11:25:24 2016 +0000 @@ -4,17 +4,6 @@ gSCIENCE_THREAD->signal_set(SCIENCE_SIGNAL); } -#define Pause_gPAY_SPI{\ - gPAY_SPI.bulkRead_init(gPAYLOAD_BUFFER, PAYLOAD_BUFFER_LENGTH, NULL);\ - gPAY_SPI.bulkRead_start();\ - } - - -#define Init_gPAY_SPI{\ - gPAY_SPI.bulkRead_init(gPAYLOAD_BUFFER, PAYLOAD_BUFFER_LENGTH, &payload_isr_fun);\ - gPAY_SPI.bulkRead_start();\ - } - void SCIENCE_FUN(void const *args){ // initialisation of payload spi @@ -22,9 +11,6 @@ gPAY_SPI.format(8,0); gPAY_SPI.bulkRead_init(gPAYLOAD_BUFFER, PAYLOAD_BUFFER_LENGTH, &payload_isr_fun); gPAY_SPI.bulkRead_start(); - Pause_gPAY_SPI; - Init_gPAY_SPI; - while(true){ gPC.puts("entering sci\r\n"); @@ -119,7 +105,6 @@ gFLAGS = gFLAGS & (~UART_INT_FLAG); if( !(gFLAGS & COM_SESSION_FLAG) ){ // PENDING : DISABLE THREADS - Pause_gPAY_SPI; gFLAGS = gFLAGS | COM_SESSION_FLAG; gSESSION_TIMEOUT.attach(&after_session, SESSION_TIME_LIMIT); gFLAGS = gFLAGS | COM_RX_FLAG; @@ -203,7 +188,6 @@ reset_all; gFLAGS = gFLAGS & (~COM_SESSION_VALIDITY); // PENDING : ENABLE THREADS - Init_gPAY_SPI; gSESSION_TIMEOUT.detach(); gFLAGS = gFLAGS & (~COM_SESSION_FLAG); // WARNING: clear COM_MNG_TMTC ? @@ -256,7 +240,6 @@ gFLAGS = gFLAGS & (~COM_MNG_TMTC_RUNNING_FLAG); reset_all; // PENDING : ENABLE THREADS - Init_gPAY_SPI; gSESSION_TIMEOUT.detach(); gFLAGS = gFLAGS & (~COM_SESSION_FLAG); } @@ -308,7 +291,6 @@ COM_POWER_OFF_TX; reset_all; // PENDING : ENABLE THREADS - Init_gPAY_SPI; gSESSION_TIMEOUT.detach(); gFLAGS = gFLAGS & (~COM_SESSION_FLAG); }