UART Command Parser Time Manager Data Store for SD Card for stm32l476 [it's not Licensed as BSD/GPLx]
Dependencies: mbed SDFileSystem
main.cpp
- Committer:
- Inscape_ao
- Date:
- 2019-04-24
- Revision:
- 5:a37e3a15444b
- Parent:
- 4:bec3f80dc49c
- Child:
- 6:81a3d517fd56
File content as of revision 5:a37e3a15444b:
/** --- Includes --- */ #include "mbed.h" #include "SDFileSystem.h" #include "TimeManager.h" #include "UartReceiver.h" #include "CommandParser.h" #include "SDDataStore.h" #include "global.h" #include "string.h" /** --- Global Variables --- */ Serial pc(SERIAL_TX, SERIAL_RX); DigitalOut myled(LED1); /** --- main --- */ int main() { /** UART Initalizer */ /* setup UART 115200, 8bit, Parity=None, stopbit:1bit */ /* https://os.mbed.com/users/okini3939/notebook/Serial_jp/ */ pc.baud(115200); pc.format(8, Serial::None, 1); /* new timer manager */ pTM = new TimeManager(); /* Generate SDDataStore */ pSds = new SDDataStore(pTM); /* Receive Buffer Control */ pUR = new UartReceiver(&pc); /* Generate Command parser as DeviceID = 0, ParsingRule = rules */ pCP = new CommandParser(pUR, 0, rules, getNumOfRules); pCP->run(); pc.printf("Hello World !\n"); //sdcard_main(); while(1) { wait(1); } }