Initial commit

This commit is contained in:
Playgrounds
2025-08-18 00:56:15 -03:00
commit f0777c2f8a
187 changed files with 219305 additions and 0 deletions

55
Application/start.cpp Normal file
View File

@@ -0,0 +1,55 @@
#include "start.h"
#include <cstdio>
#include "FreeRTOS.h"
#include "LogDriver.hpp"
#include "GPIO_Pin_STM32.hpp"
#include "BinLeds.hpp"
GPIO_Pin_STM32 ledOrange(GPIOD, GPIO_PIN_13);
GPIO_Pin_STM32 ledGreen(GPIOD, GPIO_PIN_12);
GPIO_Pin_STM32 ledRed(GPIOD, GPIO_PIN_14);
GPIO_Pin_STM32 ledBlue(GPIOD, GPIO_PIN_15);
BinLeds discoveryLeds((GPIO_Pin*[]){&ledOrange, &ledGreen, &ledRed, &ledBlue}, 4);
// Queues
// Components
void executableDispatch(void* _executable){
Executable* executable = static_cast<Executable*>(_executable);
executable->execute();
vTaskDelete(NULL);
}
void start(){
discoveryLeds.set(1);
printf("----------------INIT----------------\n");
printf("X and Y: %lu\n", HAL_GetUIDw0());
printf("Wafer number: %c\n", (uint8_t)HAL_GetUIDw1());
printf("Lot number: %c%c%c%c%c%c%c\n",
(uint8_t)(HAL_GetUIDw1()>>8),
(uint8_t)(HAL_GetUIDw1()>>16),
(uint8_t)(HAL_GetUIDw1()>>24),
(uint8_t)(HAL_GetUIDw2()),
(uint8_t)(HAL_GetUIDw2()>>8),
(uint8_t)(HAL_GetUIDw2()>>16),
(uint8_t)(HAL_GetUIDw2()>>24)
);
discoveryLeds.set(2);
// Init log facility
LogDriver::getInstance()->init();
TaskHandle_t hTaskLogDriver;
xTaskCreate(executableDispatch, "LogDriver", 256, LogDriver::getInstance(), 20, &hTaskLogDriver);
// Init queues
// Init shared resources
//Init components
//Init tasks
discoveryLeds.set(3);
vTaskDelete(nullptr);
}

14
Application/start.h Normal file
View File

@@ -0,0 +1,14 @@
#ifndef START_H_
#define START_H_
#ifdef __cplusplus
extern "C" {
#endif
void start();
#ifdef __cplusplus
}
#endif
#endif /* START_H_ */