ESPHome 2025.5.0
Loading...
Searching...
No Matches
pn532_spi.h
Go to the documentation of this file.
1#pragma once
2
6
7#include <vector>
8
9namespace esphome {
10namespace pn532_spi {
11
12class 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
bool write_data(const std::vector< uint8_t > &data) override
Definition pn532_spi.cpp:32
bool read_data(std::vector< uint8_t > &data, uint8_t len) override
Definition pn532_spi.cpp:44
bool is_read_ready() override
Definition pn532_spi.cpp:24
bool read_response(uint8_t command, std::vector< uint8_t > &data) override
Definition pn532_spi.cpp:64
The SPIDevice is what components using the SPI will create.
Definition spi.h:421
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7
std::string size_t len
Definition helpers.h:301