Base task system

This commit is contained in:
2025-12-12 15:48:36 +00:00
parent abd77a885a
commit 13c7a53818
36 changed files with 2341 additions and 2227 deletions
+13 -9
View File
@@ -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();