10 static const char *
const TAG =
"rc522_spi";
13 ESP_LOGI(TAG,
"SPI Setup");
21 LOG_PIN(
" CS Pin: ", this->
cs_);
35 ESP_LOGVV(TAG,
"read_register_(%d) -> %d", reg, value);
48 #ifdef ESPHOME_LOG_HAS_VERY_VERBOSE 66 uint8_t mask = 0xFF << rx_align;
70 values[0] = (values[0] & ~mask) | (value & mask);
73 #ifdef ESPHOME_LOG_HAS_VERY_VERBOSE 74 sprintf(cstrb,
" %x", values[0]);
78 while (index < count) {
81 #ifdef ESPHOME_LOG_HAS_VERY_VERBOSE 82 sprintf(cstrb,
" %x", values[index]);
90 #ifdef ESPHOME_LOG_HAS_VERY_VERBOSE 92 sprintf(cstrb,
"%x", values[index]);
95 ESP_LOGVV(TAG,
"read_register_array_(%x, %d, , %d) -> %s", reg, count, rx_align, buf.c_str());
118 #ifdef ESPHOME_LOG_HAS_VERY_VERBOSE 127 for (uint8_t index = 0; index < count; index++) {
130 #ifdef ESPHOME_LOG_HAS_VERY_VERBOSE 131 sprintf(cstrb,
" %x", values[index]);
136 ESP_LOGVV(TAG,
"write_register_(%d, %d) -> %s", reg, count, buf.c_str());
void spi_setup() override
uint8_t transfer_byte(uint8_t data)
void pcd_write_register(PcdRegister reg, uint8_t value) override
void write_byte(uint8_t data)
uint8_t pcd_read_register(PcdRegister reg) override
Reads a uint8_t from the specified register in the MFRC522 chip.
void dump_config() override
Implementation of SPI Controller mode.