tutrc_harurobo_lib
読み取り中…
検索中…
一致する文字列を見つけられません
fdcan.hpp
[詳解]
1#pragma once
2
3#include "main.h"
4
5#include <cstddef>
6#include <cstdint>
7#include <unordered_map>
8
9#include "cmsis_os2.h"
10
11#include "can_base.hpp"
12
13namespace tutrc_harurobo_lib {
14
15class FDCAN : public CANBase {
16public:
17 bool init(FDCAN_HandleTypeDef *hfdcan, size_t rx_queue_size = 64);
18 bool transmit(const CANMessage *msg) override;
19 bool receive(CANMessage *msg, uint32_t timeout) override;
20 size_t available() override;
21
22private:
23 FDCAN_HandleTypeDef *hfdcan_;
24 osMessageQueueId_t rx_queue_;
25
26 static std::unordered_map<FDCAN_HandleTypeDef *, FDCAN *> instances_;
27 friend void ::HAL_FDCAN_RxFifo0Callback(FDCAN_HandleTypeDef *hfdcan,
28 uint32_t RxFifo0ITs);
29};
30
31} // namespace tutrc_harurobo_lib
Definition can_base.hpp:20
Definition fdcan.hpp:15
size_t available() override
bool transmit(const CANMessage *msg) override
bool init(FDCAN_HandleTypeDef *hfdcan, size_t rx_queue_size=64)
bool receive(CANMessage *msg, uint32_t timeout) override
Definition bno055.hpp:10
Definition can_base.hpp:13