Addapted to reduced CAN task

This commit is contained in:
@CarlWachter
2024-03-08 13:56:19 +01:00
parent 29c12b00cd
commit 7732fa2823
10 changed files with 85 additions and 100 deletions

View File

@@ -15,18 +15,12 @@ namespace demo
{
class CanTask : public sta::tacos::TacosThread {
public:
CanTask(const char* name, CAN_HandleTypeDef * handle);
CanTask(const char* name, uint32_t canID);
void init() override;
void func() override;
void unpackValues(uint8_t packedByte, uint8_t* type_id, uint8_t* sensor_ID, uint8_t* value, uint8_t* include);
private:
uint8_t payload[8];
sta::STM32CanController canController;
sta::CanTxHeader txHeader;
};
} // namespace demo

View File

@@ -10,6 +10,9 @@
#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>
@@ -30,7 +33,7 @@ namespace demo
sta::STM32SPI* spi2;
sta::STM32SPIDevice* device_;
sta::MAX31855 tc*;
sta::MAX31855* tc;
};
} // namespace demo