mirror of
https://github.com/adrigongv23/G26---Telemetry-Software.git
synced 2026-08-25 11:33:17 +02:00
Todo subido
This commit is contained in:
parent
f0db3a8aeb
commit
27026caf57
87 changed files with 83292 additions and 17 deletions
25
Volante/can.hpp
Normal file
25
Volante/can.hpp
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#ifndef CAN_HPP
|
||||
#define CAN_HPP
|
||||
|
||||
#include "driver/twai.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
|
||||
class CAN {
|
||||
public:
|
||||
CAN() : _listen_task_handle(nullptr), _should_stop_listening(false) {}
|
||||
~CAN();
|
||||
|
||||
void start();
|
||||
void start_listening_task();
|
||||
void stop_listening_task();
|
||||
void listen_id();
|
||||
|
||||
private:
|
||||
static void listenTask(void *arg);
|
||||
|
||||
TaskHandle_t _listen_task_handle;
|
||||
volatile bool _should_stop_listening;
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue