Mbed OS Reference
Loading...
Searching...
No Matches
PN512TransportDriver Class Referenceabstract

The PN512 supports multiple transport mechanisms (SPI, I2C, UART): this class provides a unified API across these transports. More...

#include <PN512TransportDriver.h>

Inheritance diagram for PN512TransportDriver:
PN512SPITransportDriver

Data Structures

struct  Delegate
 The PN512TransportDriver delegate. More...
 

Public Member Functions

 PN512TransportDriver ()
 Create a PN512TransportDriver instance. More...
 
virtual ~PN512TransportDriver ()
 PN512TransportDriver destructor. More...
 
virtual void initialize ()=0
 Initialize transport driver and perform a chip reset. More...
 
virtual nfc_transport_tget_transport ()=0
 Retrieve the nfc_transport_t struct for the stack to use. More...
 
void set_delegate (Delegate *delegate)
 Set this instance's delegate. More...
 

Protected Member Functions

void hw_interrupt ()
 An implementation must call this function (can be called from interrupt context) when the PN512 asserts its interrupt line. More...
 

Detailed Description

The PN512 supports multiple transport mechanisms (SPI, I2C, UART): this class provides a unified API across these transports.

Definition at line 30 of file PN512TransportDriver.h.

Constructor & Destructor Documentation

◆ PN512TransportDriver()

◆ ~PN512TransportDriver()

virtual ~PN512TransportDriver ( )
virtual

PN512TransportDriver destructor.

Member Function Documentation

◆ initialize()

virtual void initialize ( )
pure virtual

Initialize transport driver and perform a chip reset.

◆ get_transport()

virtual nfc_transport_t * get_transport ( )
pure virtual

Retrieve the nfc_transport_t struct for the stack to use.

Returns
a pointer to a nfc_transport_t struct

◆ set_delegate()

void set_delegate ( Delegate delegate)

Set this instance's delegate.

Parameters
[in]delegatethe delegate instance to use

◆ hw_interrupt()

void hw_interrupt ( )
protected

An implementation must call this function (can be called from interrupt context) when the PN512 asserts its interrupt line.