Base task system
This commit is contained in:
+13
-9
@@ -1,3 +1,5 @@
|
||||
#include <memory>
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
#include "pico/stdlib.h"
|
||||
@@ -11,16 +13,18 @@ int main()
|
||||
{
|
||||
stdio_init_all();
|
||||
sleep_ms(2000);
|
||||
printf("We have started\n");
|
||||
printf("[Main] ---------------\n");
|
||||
printf("[Main] We have started\n");
|
||||
printf("[Main] ---------------\n");
|
||||
|
||||
Led led;
|
||||
SerialTx serial_tx;
|
||||
SerialRx serial_rx;
|
||||
Display display;
|
||||
led.start();
|
||||
serial_tx.start();
|
||||
serial_rx.start();
|
||||
display.start();
|
||||
std::shared_ptr<es::Other::Led> led = es::Task::Task<uint8_t>::create<es::Other::Led>();
|
||||
std::shared_ptr<es::Serial::SerialTx> serial_tx = es::Task::Task<uint8_t>::create<es::Serial::SerialTx>();
|
||||
std::shared_ptr<es::Serial::SerialRx> serial_rx = es::Task::Task<uint8_t>::create<es::Serial::SerialRx>();
|
||||
std::shared_ptr<es::Display::Display> display = es::Task::Task<uint8_t>::create<es::Display::Display>();
|
||||
led->start();
|
||||
serial_tx->start();
|
||||
serial_rx->start();
|
||||
display->start();
|
||||
|
||||
vTaskStartScheduler();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user