M5Unit-NFC 0.0.3 git rev:59f5362
Loading...
Searching...
No Matches
m5::nfc::EmulationLayerA Class Reference

Common interface layer for each chip of the NFC-A emulation. More...

#include <emulation_layer_a.hpp>

Public Types

enum class  State {
  None , Off , Idle , Ready ,
  Active , Halt
}
 Emulation state for NFC-A.
 

Public Member Functions

 EmulationLayerA (m5::unit::UnitST25R3916 &u)
 Construct with UnitST25R3916 (I2C)
 
 EmulationLayerA (m5::unit::CapST25R3916 &u)
 Construct with CapST25R3916 (SPI)
 
State state () const
 Gets the current emulation state.
 
const m5::nfc::a::PICCemulatePICC () const
 Gets the emulated PICC information.
 
uint32_t expiredTime () const
 Gets the expiration time (ms)
 
void setExpiredTime (const uint32_t ms)
 Sets the expiration time (ms)
 
bool begin (const m5::nfc::a::PICC &picc, uint8_t *ptr, const uint32_t size)
 Begin NFC-A emulation.
 
bool end ()
 End NFC-A emulation.
 
void update ()
 Update emulation state machine.
 
virtual State receive_callback (const uint8_t *rx, const uint32_t rx_len)
 

Protected Member Functions

void update_expired ()
 

Protected Attributes

uint8_t * _memory {}
 
uint32_t _memory_size {}
 

Detailed Description

Common interface layer for each chip of the NFC-A emulation.