Dummy program to demonstrate problems: working code
Dependencies: SLCD mbed-rtos mbed
Fork of MNG_TC by
Diff: main.cpp
- Revision:
- 14:a4c259ca0325
- Parent:
- 13:7b27a8e9cbb4
- Child:
- 17:2b04e53f3b1d
diff -r 7b27a8e9cbb4 -r a4c259ca0325 main.cpp --- a/main.cpp Mon Aug 03 14:29:35 2015 +0000 +++ b/main.cpp Mon Aug 17 12:05:09 2015 +0000 @@ -2,6 +2,11 @@ #include "mbed.h" #include "rtos.h" + +#include "iostream" +#include "bitset" +using namespace std; + #define ENDL "\r" << endl #include "SLCD.h" @@ -14,6 +19,7 @@ Serial PC(USBTX, USBRX); RawSerial rx1m(PTE0, PTE1); +SPI spi(PTA16, PTA17, PTA15); //MOSI, MISO, CLOCK Mutex SPI_mutex; DigitalOut ledr(LED_RED); @@ -88,14 +94,15 @@ int main(){ printf("welcome to mng_tm_tc\r\n"); - + cs_adf=1; + cs_SDCard=1; PC.baud(9600); rx1m.baud(1200); - rx1m.attach(&rx_read, Serial::RxIrq); VAR_SPACE::head_data = new data_list; VAR_SPACE::head_data->next = NULL; VAR_SPACE::rx_new_node = VAR_SPACE::head_data; + rx1m.attach(&rx_read, Serial::RxIrq); VAR_SPACE::mng_tmtc_thread = new Thread(com_mng_fun); MNG_TC::init();