ESPHome
2025.5.0
Loading...
Searching...
No Matches
esphome
components
rc522_spi
rc522_spi.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/core/component.h
"
4
#include "
esphome/components/rc522/rc522.h
"
5
#include "
esphome/components/spi/spi.h
"
6
7
namespace
esphome
{
16
namespace
rc522_spi {
17
18
class
RC522Spi
:
public
rc522::RC522
,
19
public
spi::SPIDevice
<spi::BIT_ORDER_MSB_FIRST, spi::CLOCK_POLARITY_LOW, spi::CLOCK_PHASE_LEADING,
20
spi::DATA_RATE_4MHZ> {
21
public
:
22
void
setup
()
override
;
23
24
void
dump_config
()
override
;
25
26
protected
:
27
uint8_t
pcd_read_register
(
PcdRegister
reg
28
)
override
;
29
34
void
pcd_read_register
(
PcdRegister
reg,
35
uint8_t count,
36
uint8_t *values,
37
uint8_t rx_align
38
)
override
;
39
void
pcd_write_register
(
PcdRegister
reg,
40
uint8_t value
41
)
override
;
42
47
void
pcd_write_register
(
PcdRegister
reg,
48
uint8_t count,
49
uint8_t *values
50
)
override
;
51
};
52
53
}
// namespace rc522_spi
54
}
// namespace esphome
esphome::rc522::RC522
Definition
rc522.h:15
esphome::rc522::RC522::PcdRegister
PcdRegister
Definition
rc522.h:60
esphome::rc522_spi::RC522Spi
Definition
rc522_spi.h:20
esphome::rc522_spi::RC522Spi::setup
void setup() override
Definition
rc522_spi.cpp:12
esphome::rc522_spi::RC522Spi::pcd_write_register
void pcd_write_register(PcdRegister reg, uint8_t value) override
Definition
rc522_spi.cpp:100
esphome::rc522_spi::RC522Spi::pcd_read_register
uint8_t pcd_read_register(PcdRegister reg) override
Reads a uint8_t from the specified register in the MFRC522 chip.
Definition
rc522_spi.cpp:28
esphome::rc522_spi::RC522Spi::dump_config
void dump_config() override
Definition
rc522_spi.cpp:19
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
rc522.h
spi.h
Generated by
1.12.0