ESPHome
2025.6.0
Loading...
Searching...
No Matches
esphome
components
pn7160_spi
pn7160_spi.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/core/component.h
"
4
#include "
esphome/components/nfc/nci_core.h
"
5
#include "
esphome/components/pn7160/pn7160.h
"
6
#include "
esphome/components/spi/spi.h
"
7
8
#include <vector>
9
10
namespace
esphome
{
11
namespace
pn7160_spi {
12
13
static
const
uint8_t TDD_SPI_READ = 0xFF;
14
static
const
uint8_t TDD_SPI_WRITE = 0x0A;
15
16
class
PN7160Spi
:
public
pn7160::PN7160
,
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
esphome::nfc::NciMessage
Definition
nci_message.h:11
esphome::pn7160::PN7160
Definition
pn7160.h:160
esphome::pn7160_spi::PN7160Spi
Definition
pn7160_spi.h:18
esphome::pn7160_spi::PN7160Spi::read_nfcc
uint8_t read_nfcc(nfc::NciMessage &rx, uint16_t timeout) override
Definition
pn7160_spi.cpp:15
esphome::pn7160_spi::PN7160Spi::write_nfcc
uint8_t write_nfcc(nfc::NciMessage &tx) override
Definition
pn7160_spi.cpp:40
esphome::pn7160_spi::PN7160Spi::setup
void setup() override
Definition
pn7160_spi.cpp:9
esphome::pn7160_spi::PN7160Spi::dump_config
void dump_config() override
Definition
pn7160_spi.cpp:48
esphome::spi::SPIDevice
The SPIDevice is what components using the SPI will create.
Definition
spi.h:421
component.h
esphome
Providing packet encoding functions for exchanging data with a remote host.
Definition
a01nyub.cpp:7
nci_core.h
pn7160.h
spi.h
Generated by
1.12.0