Initial commit
This commit is contained in:
1
Application/Shared/RoboFramework
Submodule
1
Application/Shared/RoboFramework
Submodule
Submodule Application/Shared/RoboFramework added at 89e7c6d071
1
Application/Shared/RoboFramework_STM32
Submodule
1
Application/Shared/RoboFramework_STM32
Submodule
Submodule Application/Shared/RoboFramework_STM32 added at af0b26e826
55
Application/start.cpp
Normal file
55
Application/start.cpp
Normal 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
14
Application/start.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#ifndef START_H_
|
||||
#define START_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void start();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* START_H_ */
|
||||
Reference in New Issue
Block a user