mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/CAN-Demo.git
synced 2025-08-05 21:59:42 +00:00
Working CAN sending on TACOS via user space
This commit is contained in:
32
App/Inc/tasks/can_task.hpp
Normal file
32
App/Inc/tasks/can_task.hpp
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* can_task.hpp
|
||||
*
|
||||
* Created on: 10 Dec 2023
|
||||
* Author: Carl
|
||||
*/
|
||||
|
||||
#ifndef INC_TASKS_CANTASK_HPP_
|
||||
#define INC_TASKS_CANTASK_HPP_
|
||||
|
||||
#include <sta/tacos/thread.hpp>
|
||||
#include <sta/devices/stm32/can.hpp>
|
||||
|
||||
namespace demo
|
||||
{
|
||||
class CanTask : public sta::tacos::TacosThread {
|
||||
public:
|
||||
CanTask(const char* name, CAN_HandleTypeDef * handle);
|
||||
|
||||
void init() override;
|
||||
|
||||
void func() override;
|
||||
|
||||
private:
|
||||
|
||||
uint8_t payload[8];
|
||||
sta::STM32CanController canController;
|
||||
sta::CanTxHeader txHeader;
|
||||
};
|
||||
} // namespace demo
|
||||
|
||||
#endif /* INC_TASKS_CANTASK_HPP_ */
|
Reference in New Issue
Block a user