CDMS code for testing sbc
Dependencies: FreescaleIAP SimpleDMA mbed-rtos mbed
Fork of CDMS_CODE by
Diff: main.cpp
- Revision:
- 158:6afad8428e82
- Parent:
- 136:8074893cd24e
- Child:
- 159:9951e803975f
--- a/main.cpp Thu Mar 10 15:26:50 2016 +0000 +++ b/main.cpp Wed Apr 13 14:25:48 2016 +0000 @@ -41,7 +41,7 @@ // ******************INITIALISATIONS START****************** // COM RX - RX1M.baud(1200); + RX1M.baud(115200); gRX_HEAD_DATA_NODE = new COM_RX_DATA_NODE; gRX_HEAD_DATA_NODE->next_node = NULL; gRX_CURRENT_DATA_NODE = gRX_HEAD_DATA_NODE; @@ -49,10 +49,9 @@ // gRX_CURRENT_PTR = gRX_CURRENT_DATA_NODE->values; RX1M.attach(&rx_read, Serial::RxIrq); - #if I2c //I2C to Payload (depends on pl interrupt design) PYLD_I2C_Int.rise(&isr_pyldtm); - #endif + master.frequency(400000); // DEBUG //gPC.puts("welcome to mng_tm_tc\r\n"); @@ -111,28 +110,7 @@ {delete gSCIENCE_THREAD; break;} }*/ - #if I2c - int i =0 ; - char test[1] ; - test[0] = 7; - while(1) - { - - wait(5); - printf("Wriring to I2C\n"); - master.write(addr_pl|0x00,test,1); - - if(rcv_isr == 1) - { - for(i = 0; i < 134 ; i++) - { - printf("%d\r\n",PL_I2C_DATA[i]); - } - rcv_isr = 0; - } - - } - #endif + while(true){ Thread::wait(osWaitForever); //state = gCOM_MNG_TMTC_THREAD->get_state() + '0';