Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
NFCEEPROMDriver Class Reference
[Nfc]
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. | |
virtual | ~NFCEEPROMDriver () |
NFCEEPROM driver destructor. | |
void | set_delegate (Delegate *delegate) |
Set the delegate that will receive events generated by this EEPROM. | |
void | set_event_queue (events::EventQueue *queue) |
Set the event queue that will be used to schedule event handling. | |
virtual void | reset ()=0 |
Reset and initialize the EEPROM. | |
virtual size_t | read_max_size ()=0 |
Get the maximum memory size addressable by the EEPROM. | |
virtual void | start_session (bool force=true)=0 |
Start a session of operations (reads, writes, erases, size gets/sets). | |
virtual void | end_session ()=0 |
End a session. | |
virtual void | read_bytes (uint32_t address, uint8_t *bytes, size_t count)=0 |
Read bytes from memory. | |
virtual void | write_bytes (uint32_t address, const uint8_t *bytes, size_t count)=0 |
Write bytes to memory. | |
virtual void | read_size ()=0 |
Retrieve the size of the addressable memory. | |
virtual void | write_size (size_t count)=0 |
Set the size of the addressable memory. | |
virtual void | erase_bytes (uint32_t address, size_t size)=0 |
Erase bytes from memory. |
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
NFCEEPROMDriver | ( | ) |
Construct a NFCEEPROM driver instance.
Definition at line 22 of file NFCEEPROMDriver.cpp.
~NFCEEPROMDriver | ( | ) | [virtual] |
NFCEEPROM driver destructor.
Definition at line 27 of file NFCEEPROMDriver.cpp.
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] 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().
virtual void read_bytes | ( | uint32_t | address, |
uint8_t * | bytes, | ||
size_t | count | ||
) | [pure virtual] |
Read bytes from memory.
- Parameters:
-
[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().
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] delegate the delegate instance to use
Definition at line 32 of file NFCEEPROMDriver.cpp.
void set_event_queue | ( | events::EventQueue * | queue ) |
Set the event queue that will be used to schedule event handling.
- Parameters:
-
[in] queue the queue instance to use
Definition at line 37 of file NFCEEPROMDriver.cpp.
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] 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().
virtual void write_size | ( | size_t | count ) | [pure virtual] |
Set the size of the addressable memory.
- Parameters:
-
[in] count the number of addressable bytes. This method should complete asynchronously by calling has_set_size().
Generated on Tue Jul 12 2022 13:55:44 by
