18#ifndef PN532_ADAPTER_H
19#define PN532_ADAPTER_H
21#include "CW_NfcTransport.h"
78 bool begin()
override;
101 bool sendAPDU(
const uint8_t *apdu, uint8_t apduLen,
102 uint8_t *response, uint8_t &responseLen)
override;
120 uint8_t *response, uint16_t &responseLen)
override;
void resetReader() override
Release the currently selected NFC target.
pn532_t _dev
PN532 device state (owned by this adapter).
bool printFirmwareVersion() override
Query and log the PN532 firmware version.
bool sendAPDU(const uint8_t *apdu, uint8_t apduLen, uint8_t *response, uint8_t &responseLen) override
Exchange one ISO-DEP APDU with the selected card (short response).
PN532Adapter(const pn532_config_t &config, CW_Logger &logger)
Construct the adapter with the given PN532 configuration.
pn532_config_t _config
Stored configuration forwarded to pn532_init.
bool inListPassiveTarget() override
Scan for a passive ISO 14443-A card.
bool begin() override
Initialise the PN532 driver and configure the SAM.
bool sendAPDULarge(const uint8_t *apdu, uint8_t apduLen, uint8_t *response, uint16_t &responseLen) override
Exchange one ISO-DEP APDU with the selected card (large response).
CW_Logger & _logger
Logger reference for printFirmwareVersion.
bool _initialized
true after a successful pn532_init call.
Low-level PN532 NFC controller driver for ESP-IDF (SPI and I²C).
Compile-time configuration passed to pn532_init.
Opaque-like runtime state for a single PN532 instance.