ESPHome  2024.11.0
pn532_i2c.h
Go to the documentation of this file.
1 #pragma once
2 
6 
7 #include <vector>
8 
9 namespace esphome {
10 namespace pn532_i2c {
11 
12 class PN532I2C : public pn532::PN532, public i2c::I2CDevice {
13  public:
14  void dump_config() override;
15 
16  protected:
17  bool is_read_ready() override;
18  bool write_data(const std::vector<uint8_t> &data) override;
19  bool read_data(std::vector<uint8_t> &data, uint8_t len) override;
20  bool read_response(uint8_t command, std::vector<uint8_t> &data) override;
21  uint8_t read_response_length_();
22 };
23 
24 } // namespace pn532_i2c
25 } // namespace esphome
bool read_data(std::vector< uint8_t > &data, uint8_t len) override
Definition: pn532_i2c.cpp:27
bool write_data(const std::vector< uint8_t > &data) override
Definition: pn532_i2c.cpp:23
bool is_read_ready() override
Definition: pn532_i2c.cpp:15
std::string size_t len
Definition: helpers.h:293
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
void dump_config() override
Definition: pn532_i2c.cpp:123
bool read_response(uint8_t command, std::vector< uint8_t > &data) override
Definition: pn532_i2c.cpp:39
This Class provides the methods to read/write bytes from/to an i2c device.
Definition: i2c.h:133