Mistake on this page?
Report an issue in GitHub or email us
Data Structures | Public Member Functions
NFCEEPROMDriver Class Referenceabstract

The abstraction for a NFC EEPROM driver. More...

#include <NFCEEPROMDriver.h>

Data Structures

struct  Delegate
 The NFCEEPROMDriver delegate. More...
 

Public Member Functions

 NFCEEPROMDriver ()
 Construct a NFCEEPROM driver instance. More...
 
virtual ~NFCEEPROMDriver ()
 NFCEEPROM driver destructor. More...
 
void set_delegate (Delegate *delegate)
 Set the delegate that will receive events generated by this EEPROM. More...
 
void set_event_queue (events::EventQueue *queue)
 Set the event queue that will be used to schedule event handling. More...
 
virtual void reset ()=0
 Reset and initialize the EEPROM. More...
 
virtual size_t read_max_size ()=0
 Get the maximum memory size addressable by the EEPROM. More...
 
virtual void start_session (bool force=true)=0
 Start a session of operations (reads, writes, erases, size gets/sets). More...
 
virtual void end_session ()=0
 End a session. More...
 
virtual void read_bytes (uint32_t address, uint8_t *bytes, size_t count)=0
 Read bytes from memory. More...
 
virtual void write_bytes (uint32_t address, const uint8_t *bytes, size_t count)=0
 Write bytes to memory. More...
 
virtual void read_size ()=0
 Retrieve the size of the addressable memory. More...
 
virtual void write_size (size_t count)=0
 Set the size of the addressable memory. More...
 
virtual void erase_bytes (uint32_t address, size_t size)=0
 Erase bytes from memory. More...
 

Detailed Description

The abstraction for a NFC EEPROM driver.

Implementers need to derive from this class and implement its methods.

Definition at line 36 of file NFCEEPROMDriver.h.

Constructor & Destructor Documentation

Construct a NFCEEPROM driver instance.

virtual ~NFCEEPROMDriver ( )
virtual

NFCEEPROM driver destructor.

Member Function Documentation

virtual void end_session ( )
pure virtual

End a session.

This method should complete asynchronously by calling has_ended_session().

virtual void erase_bytes ( uint32_t  address,
size_t  size 
)
pure virtual

Erase bytes from memory.

Parameters
[in]addressthe virtual address (starting from 0) from which to start erasing.
[in]sizethe number of bytes to erase. This method should complete asynchronously by calling has_erased_bytes().
virtual void read_bytes ( uint32_t  address,
uint8_t *  bytes,
size_t  count 
)
pure virtual

Read bytes from memory.

Parameters
[in]addressthe virtual address (starting from 0) from which to start the read.
[out]bytesa buffer in which the read bytes will be stored. This buffer should remain valid till the callback is called.
[in]countthe number of bytes to read. This method should complete asynchronously by calling has_read_bytes().
virtual size_t read_max_size ( )
pure virtual

Get the maximum memory size addressable by the EEPROM.

virtual void read_size ( )
pure virtual

Retrieve the size of the addressable memory.

This method should complete asynchronously by calling has_gotten_size().

virtual void reset ( )
pure virtual

Reset and initialize the EEPROM.

This method should complete synchronously.

void set_delegate ( Delegate delegate)

Set the delegate that will receive events generated by this EEPROM.

Parameters
[in]delegatethe delegate instance to use
void set_event_queue ( events::EventQueue queue)

Set the event queue that will be used to schedule event handling.

Parameters
[in]queuethe queue instance to use
virtual void start_session ( bool  force = true)
pure virtual

Start a session of operations (reads, writes, erases, size gets/sets).

This method is called prior to any memory access to allow the underlying implementation to disable the RF interface or abort the transaction if it's being used. This method should complete asynchronously by calling has_started_session().

virtual void write_bytes ( uint32_t  address,
const uint8_t *  bytes,
size_t  count 
)
pure virtual

Write bytes to memory.

Parameters
[in]addressthe virtual address (starting from 0) from which to start the write.
[in]bytesa buffer from to copy. This buffer should remain valid till the callback is called.
[in]countthe number of bytes to write. This method should complete asynchronously by calling has_written_bytes().
virtual void write_size ( size_t  count)
pure virtual

Set the size of the addressable memory.

Parameters
[in]countthe number of addressable bytes. This method should complete asynchronously by calling has_set_size().
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.