mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/CAN-Demo.git
synced 2025-08-06 14:07:35 +00:00
Relay and Thermo tasks
This commit is contained in:
29
App/Inc/tasks/relay.hpp
Normal file
29
App/Inc/tasks/relay.hpp
Normal file
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* can_task.hpp
|
||||
*
|
||||
* Created on: 10 Dec 2023
|
||||
* Author: Carl
|
||||
*/
|
||||
|
||||
#ifndef INC_TASKS_RELAYTASK_HPP_
|
||||
#define INC_TASKS_RELAYTASK_HPP_
|
||||
|
||||
#include <sta/tacos/thread.hpp>
|
||||
#include <sta/devices/stm32/can.hpp>
|
||||
|
||||
namespace tasks
|
||||
{
|
||||
class RelayTask : public sta::tacos::TacosThread {
|
||||
public:
|
||||
RelayTask(uint32_t canID);
|
||||
|
||||
void init() override;
|
||||
|
||||
void func() override;
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
} // namespace demo
|
||||
|
||||
#endif /* INC_TASKS_RELAYTASK_HPP_ */
|
@@ -16,11 +16,11 @@
|
||||
#include <gpio.h>
|
||||
#include <spi.h>
|
||||
|
||||
namespace demo
|
||||
namespace tasks
|
||||
{
|
||||
class ThermoTask : public sta::tacos::TacosThread {
|
||||
public:
|
||||
ThermoTask();
|
||||
ThermoTask(uint32_t canID);
|
||||
|
||||
void init() override;
|
||||
|
||||
@@ -28,12 +28,14 @@ namespace demo
|
||||
|
||||
private:
|
||||
|
||||
sta::STM32GpioPin cs_pin = sta::STM32GpioPin(GPIOE, GPIO_PIN_13);
|
||||
sta::STM32GpioPin* cs_pin[5];
|
||||
|
||||
sta::RtosMutex* mutex;
|
||||
sta::STM32SPI* spi2;
|
||||
sta::STM32SPIDevice* device_;
|
||||
|
||||
sta::MAX31855* tc;
|
||||
sta::STM32SPIDevice* device_[5];
|
||||
|
||||
sta::MAX31855* tc_[5];
|
||||
|
||||
};
|
||||
} // namespace demo
|
||||
|
Reference in New Issue
Block a user