ESPHome  2024.4.1
esp32_can.h
Go to the documentation of this file.
1 #pragma once
2 
3 #ifdef USE_ESP32
4 
7 
8 namespace esphome {
9 namespace esp32_can {
10 
11 class ESP32Can : public canbus::Canbus {
12  public:
13  void set_rx(int rx) { rx_ = rx; }
14  void set_tx(int tx) { tx_ = tx; }
15  ESP32Can(){};
16 
17  protected:
18  bool setup_internal() override;
19  canbus::Error send_message(struct canbus::CanFrame *frame) override;
20  canbus::Error read_message(struct canbus::CanFrame *frame) override;
21 
22  int rx_{-1};
23  int tx_{-1};
24 };
25 
26 } // namespace esp32_can
27 } // namespace esphome
28 
29 #endif
bool setup_internal() override
Definition: esp32_can.cpp:69
canbus::Error read_message(struct canbus::CanFrame *frame) override
Definition: esp32_can.cpp:126
This is a workaround until we can figure out a way to get the tflite-micro idf component code availab...
Definition: a01nyub.cpp:7
canbus::Error send_message(struct canbus::CanFrame *frame) override
Definition: esp32_can.cpp:97