ESPHome  2024.3.2
pn532_spi.h
Go to the documentation of this file.
1 #pragma once
2 
6 
7 #include <vector>
8 
9 namespace esphome {
10 namespace pn532_spi {
11 
12 class PN532Spi : public pn532::PN532,
13  public spi::SPIDevice<spi::BIT_ORDER_LSB_FIRST, spi::CLOCK_POLARITY_LOW, spi::CLOCK_PHASE_LEADING,
14  spi::DATA_RATE_1MHZ> {
15  public:
16  void setup() override;
17 
18  void dump_config() override;
19 
20  protected:
21  bool is_read_ready() override;
22  bool write_data(const std::vector<uint8_t> &data) override;
23  bool read_data(std::vector<uint8_t> &data, uint8_t len) override;
24  bool read_response(uint8_t command, std::vector<uint8_t> &data) override;
25 };
26 
27 } // namespace pn532_spi
28 } // namespace esphome
void dump_config() override
Definition: pn532_spi.cpp:132
bool read_response(uint8_t command, std::vector< uint8_t > &data) override
Definition: pn532_spi.cpp:64
bool read_data(std::vector< uint8_t > &data, uint8_t len) override
Definition: pn532_spi.cpp:44
The SPIDevice is what components using the SPI will create.
Definition: spi.h:408
bool write_data(const std::vector< uint8_t > &data) override
Definition: pn532_spi.cpp:32
std::string size_t len
Definition: helpers.h:292
This is a workaround until we can figure out a way to get the tflite-micro idf component code availab...
Definition: a01nyub.cpp:7
bool is_read_ready() override
Definition: pn532_spi.cpp:24