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-23
- Revision:
- 2:a694440145e9
- Parent:
- 1:71c9c97c9f3d
- Child:
- 4:bec3f80dc49c
File content as of revision 2:a694440145e9:
/** --- Includes --- */ #include "mbed.h" #include "SDFileSystem.h" #include "TimeManager.h" #include "UartReceiver.h" #include "CommandParser.h" #include "global.h" #include "string.h" /** --- Global Variables --- */ Serial pc(SERIAL_TX, SERIAL_RX); DigitalOut myled(LED1); SDFileSystem sd(SPI_MOSI, SPI_MISO, SPI_SCK, D4, "sd"); /** --- 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(); /* 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"); while(1) { wait(1); } }