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... | |
The abstraction for a NFC EEPROM driver.
Implementers need to derive from this class and implement its methods.
Definition at line 37 of file NFCEEPROMDriver.h.
NFCEEPROMDriver | ( | ) |
Construct a NFCEEPROM driver instance.
|
virtual |
NFCEEPROM driver destructor.
|
pure virtual |
End a session.
This method should complete asynchronously by calling has_ended_session().
Implemented in M24srDriver.
|
pure virtual |
Erase bytes from memory.
[in] | address | the virtual address (starting from 0) from which to start erasing. |
[in] | size | the number of bytes to erase. This method should complete asynchronously by calling has_erased_bytes(). |
Implemented in M24srDriver.
|
pure virtual |
Read bytes from memory.
[in] | address | the virtual address (starting from 0) from which to start the read. |
[out] | bytes | a buffer in which the read bytes will be stored. This buffer should remain valid till the callback is called. |
[in] | count | the number of bytes to read. This method should complete asynchronously by calling has_read_bytes(). |
Implemented in M24srDriver.
|
pure virtual |
Get the maximum memory size addressable by the EEPROM.
Implemented in M24srDriver.
|
pure virtual |
Retrieve the size of the addressable memory.
This method should complete asynchronously by calling has_gotten_size().
Implemented in M24srDriver.
|
pure virtual |
Reset and initialize the EEPROM.
This method should complete synchronously.
Implemented in M24srDriver.
void set_delegate | ( | Delegate * | delegate | ) |
Set the delegate that will receive events generated by this EEPROM.
[in] | delegate | the delegate instance to use |
void set_event_queue | ( | events::EventQueue * | queue | ) |
Set the event queue that will be used to schedule event handling.
[in] | queue | the queue instance to use |
|
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().
Implemented in M24srDriver.
|
pure virtual |
Write bytes to memory.
[in] | address | the virtual address (starting from 0) from which to start the write. |
[in] | bytes | a buffer from to copy. This buffer should remain valid till the callback is called. |
[in] | count | the number of bytes to write. This method should complete asynchronously by calling has_written_bytes(). |
Implemented in M24srDriver.
|
pure virtual |
Set the size of the addressable memory.
[in] | count | the number of addressable bytes. This method should complete asynchronously by calling has_set_size(). |
Implemented in M24srDriver.