CAN-Demo/App/Inc/tasks/thermo.hpp
2024-03-11 14:41:56 +01:00

44 lines
712 B
C++

/*
* can_task.hpp
*
* Created on: 10 Dec 2023
* Author: Carl
*/
#ifndef INC_TASKS_THERMO_HPP_
#define INC_TASKS_THERMO_HPP_
#include <sta/tacos/thread.hpp>
#include <sta/devices/stm32/can.hpp>
#include <sta/rtos/mutex.hpp>
#include <sta/MAX31855.hpp>
#include <sta/devices/stm32/bus/spi.hpp>
#include <gpio.h>
#include <spi.h>
namespace tasks
{
class ThermoTask : public sta::tacos::TacosThread {
public:
ThermoTask(uint32_t canID);
void init() override;
void func() override;
private:
sta::STM32GpioPin* cs_pin[5];
sta::RtosMutex* mutex;
sta::STM32SPI* spi2;
sta::STM32SPIDevice* device_[5];
sta::MAX31855* tc_[5];
};
} // namespace demo
#endif /* INC_TASKS_THERMO_HPP_ */