18 #ifndef MBED_NFC_EEPROM_DRIVER_H 19 #define MBED_NFC_EEPROM_DRIVER_H 23 #include "events/EventQueue.h" 88 virtual void on_size_read(
bool success,
size_t size) = 0;
126 virtual void reset() = 0;
155 virtual void read_bytes(uint32_t address, uint8_t *bytes,
size_t count) = 0;
165 virtual void write_bytes(uint32_t address,
const uint8_t *bytes,
size_t count) = 0;
186 virtual void erase_bytes(uint32_t address,
size_t size) = 0;
NFCEEPROMDriver()
Construct a NFCEEPROM driver instance.
virtual void write_bytes(uint32_t address, const uint8_t *bytes, size_t count)=0
Write bytes to memory.
virtual void on_session_ended(bool success)=0
Completion of session end operation.
virtual void on_session_started(bool success)=0
Completion of session start operation.
virtual void on_size_written(bool success)=0
Completion of size setting operation.
virtual void read_size()=0
Retrieve the size of the addressable memory.
The abstraction for a NFC EEPROM driver.
virtual void end_session()=0
End a session.
virtual void reset()=0
Reset and initialize the EEPROM.
virtual void read_bytes(uint32_t address, uint8_t *bytes, size_t count)=0
Read bytes from memory.
virtual void write_size(size_t count)=0
Set the size of the addressable memory.
virtual size_t read_max_size()=0
Get the maximum memory size addressable by the EEPROM.
void set_event_queue(events::EventQueue *queue)
Set the event queue that will be used to schedule event handling.
void set_delegate(Delegate *delegate)
Set the delegate that will receive events generated by this EEPROM.
virtual void start_session(bool force=true)=0
Start a session of operations (reads, writes, erases, size gets/sets).
virtual void erase_bytes(uint32_t address, size_t size)=0
Erase bytes from memory.
virtual void on_bytes_written(size_t count)=0
Completion of write operation.
virtual ~NFCEEPROMDriver()
NFCEEPROM driver destructor.
virtual void on_bytes_erased(size_t count)=0
Completion of erasing operation.
virtual void on_bytes_read(size_t count)=0
Completion of read operation.
The NFCEEPROMDriver delegate.
virtual void on_size_read(bool success, size_t size)=0
Completion of size retrieval operation.