ESPHome 2025.5.2
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
pn7160_spi.h
Go to the documentation of this file.
1#pragma once
2
7
8#include <vector>
9
10namespace esphome {
11namespace pn7160_spi {
12
13static const uint8_t TDD_SPI_READ = 0xFF;
14static const uint8_t TDD_SPI_WRITE = 0x0A;
15
17 public spi::SPIDevice<spi::BIT_ORDER_MSB_FIRST, spi::CLOCK_POLARITY_LOW, spi::CLOCK_PHASE_LEADING,
18 spi::DATA_RATE_4MHZ> {
19 public:
20 void setup() override;
21
22 void dump_config() override;
23
24 protected:
25 uint8_t read_nfcc(nfc::NciMessage &rx, uint16_t timeout) override;
26 uint8_t write_nfcc(nfc::NciMessage &tx) override;
27};
28
29} // namespace pn7160_spi
30} // namespace esphome
uint8_t read_nfcc(nfc::NciMessage &rx, uint16_t timeout) override
uint8_t write_nfcc(nfc::NciMessage &tx) override
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