ESPHome
2026.11.0-dev
Loading...
Searching...
No Matches
esphome
components
st25r_spi
st25r_spi.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/core/component.h
"
4
#include "
esphome/components/spi/spi.h
"
5
#include "
esphome/components/st25r/st25r.h
"
6
7
namespace
esphome::st25r_spi
{
8
9
class
ST25RSpi
:
public
st25r::ST25R
,
10
public
spi::SPIDevice
<spi::BIT_ORDER_MSB_FIRST, spi::CLOCK_POLARITY_LOW, spi::CLOCK_PHASE_TRAILING,
11
spi::DATA_RATE_200KHZ> {
12
public
:
13
void
setup
()
override
;
14
void
dump_config
()
override
;
15
16
protected
:
17
uint8_t
read_register
(uint8_t reg)
override
;
18
void
write_register
(uint8_t reg, uint8_t value)
override
;
19
void
write_command
(uint8_t command)
override
;
20
void
write_fifo
(
const
uint8_t *data,
size_t
len
)
override
;
21
void
read_fifo
(uint8_t *data,
size_t
len
)
override
;
22
};
23
24
}
// namespace esphome::st25r_spi
esphome::spi::SPIDevice
The SPIDevice is what components using the SPI will create.
Definition
spi.h:456
esphome::st25r::ST25R
Definition
st25r.h:67
esphome::st25r_spi::ST25RSpi
Definition
st25r_spi.h:11
esphome::st25r_spi::ST25RSpi::setup
void setup() override
Definition
st25r_spi.cpp:8
esphome::st25r_spi::ST25RSpi::read_fifo
void read_fifo(uint8_t *data, size_t len) override
Definition
st25r_spi.cpp:52
esphome::st25r_spi::ST25RSpi::read_register
uint8_t read_register(uint8_t reg) override
Definition
st25r_spi.cpp:18
esphome::st25r_spi::ST25RSpi::write_register
void write_register(uint8_t reg, uint8_t value) override
Definition
st25r_spi.cpp:29
esphome::st25r_spi::ST25RSpi::write_command
void write_command(uint8_t command) override
Definition
st25r_spi.cpp:39
esphome::st25r_spi::ST25RSpi::dump_config
void dump_config() override
Definition
st25r_spi.cpp:13
esphome::st25r_spi::ST25RSpi::write_fifo
void write_fifo(const uint8_t *data, size_t len) override
Definition
st25r_spi.cpp:45
component.h
esphome::st25r_spi
Definition
st25r_spi.cpp:4
esphome::len
const void size_t len
Definition
hal.h:68
spi.h
st25r.h
Generated by
1.12.0