CDMS code for testing sbc
Dependencies: FreescaleIAP SimpleDMA mbed-rtos mbed
Fork of CDMS_CODE by
Diff: main.cpp
- Revision:
- 126:b7c024b5632d
- Parent:
- 114:9fb55057b13f
- Child:
- 130:d5b53088270b
--- a/main.cpp Mon Feb 08 14:24:08 2016 +0000 +++ b/main.cpp Wed Feb 10 17:01:26 2016 +0000 @@ -2,7 +2,7 @@ #include "mbed.h" -#define DEBUG 1 +#define DEBUG 0 #include "SimpleDMA.h" #include "dmaSPIslave.h" @@ -13,7 +13,7 @@ #include "pinconfig.h" #include "DefinitionsAndGlobals.h" #include "crc.h" -#include "i2c.h" +//#include "i2c.h" #include "COM_SND_TM_functions.h" #include "COM_SND_TM.h" #include "cdms_sd.h" @@ -42,6 +42,10 @@ // gRX_CURRENT_PTR = gRX_CURRENT_DATA_NODE->values; RX1M.attach(&rx_read, Serial::RxIrq); + //I2C to Payload + PYLD_I2C_Int.rise(&isr_pyldtm); + + // DEBUG //gPC.puts("welcome to mng_tm_tc\r\n"); gPC.baud(1200); @@ -71,10 +75,17 @@ gSCIENCE_THREAD = new Thread(SCIENCE_FUN); // gPC.puts("step one complete\r\n"); gSCIENCE_THREAD->set_priority(osPriorityBelowNormal); + + //thread for I2C + ptr_t_pyldtm = new Thread(pyldtm); + gSCIENCE_THREAD->set_priority(osPriorityLow);//need to check the priorities + + #if DEBUG gPC.puts("competed allocating threads\r\n"); #endif + // *******************INITIALISATIONS END******************** //RtosTimer gCDMS_HK_TIMER(FCTN_CDMS_HK_MAIN, osTimerPeriodic);