17#ifndef CW_NFCTRANSPORT_H
18#define CW_NFCTRANSPORT_H
63 virtual bool sendAPDU(
const uint8_t* apdu, uint8_t apduLen,
64 uint8_t* response, uint8_t& responseLen) = 0;
82 uint8_t* response, uint16_t& responseLen) {
83 uint8_t smallLen =
static_cast<uint8_t
>(
84 (responseLen >
static_cast<uint16_t
>(UINT8_MAX))
85 ?
static_cast<uint16_t
>(UINT8_MAX)
87 bool result =
sendAPDU(apdu, apduLen, response, smallLen);
88 responseLen =
static_cast<uint16_t
>(smallLen);
Abstract interface for NFC transport operations.
virtual ~CW_NfcTransport()
virtual bool inListPassiveTarget()=0
Detect the presence of a passive ISO-DEP NFC target.
virtual bool sendAPDULarge(const uint8_t *apdu, uint8_t apduLen, uint8_t *response, uint16_t &responseLen)
Send an APDU and receive a response that may exceed 255 bytes.
virtual void resetReader()=0
Reset the NFC reader/field for the next card detection cycle.
virtual bool printFirmwareVersion()=0
Print NFC module firmware version information to the logger.
virtual bool sendAPDU(const uint8_t *apdu, uint8_t apduLen, uint8_t *response, uint8_t &responseLen)=0
Send an APDU command to the card and receive the response.
virtual bool begin()=0
Initialize the NFC transport hardware.