7 static const char *
const TAG =
"pn7160_spi";
17 ESP_LOGW(TAG,
"read_nfcc_() timeout waiting for IRQ");
18 return nfc::STATUS_FAILED;
28 rx.
get_message().resize(length + nfc::NCI_PKT_HEADER_SIZE);
33 if (this->
wait_for_irq_(pn7160::NFCC_DEFAULT_TIMEOUT,
false) != nfc::STATUS_OK) {
34 ESP_LOGW(TAG,
"read_nfcc_() post-read timeout waiting for IRQ line to clear");
35 return nfc::STATUS_FAILED;
37 return nfc::STATUS_OK;
45 return nfc::STATUS_OK;
49 PN7160::dump_config();
50 LOG_PIN(
" CS Pin: ", this->
cs_);
virtual void digital_write(bool value)=0
uint8_t write_nfcc(nfc::NciMessage &tx) override
uint8_t wait_for_irq_(uint16_t timeout=NFCC_DEFAULT_TIMEOUT, bool pin_state=true)
void dump_config() override
void spi_setup() override
void write_byte(uint8_t data)
std::vector< uint8_t > & get_message()
void read_array(uint8_t *data, size_t length)
void write_array(const uint8_t *data, size_t length)
uint8_t get_payload_size(bool recompute=false)
Implementation of SPI Controller mode.
std::vector< uint8_t > encode()
uint8_t read_nfcc(nfc::NciMessage &rx, uint16_t timeout) override