18#ifndef MBED_NFC_EEPROM_DRIVER_H
19#define MBED_NFC_EEPROM_DRIVER_H
23#include "events/EventQueue.h"
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;
The abstraction for a NFC EEPROM driver.
virtual void read_size()=0
Retrieve the size of the addressable memory.
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 ~NFCEEPROMDriver()
NFCEEPROM driver destructor.
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 void erase_bytes(uint32_t address, size_t size)=0
Erase bytes from memory.
virtual size_t read_max_size()=0
Get the maximum memory size addressable by the EEPROM.
NFCEEPROMDriver()
Construct a NFCEEPROM driver instance.
virtual void end_session()=0
End a session.
virtual void write_bytes(uint32_t address, const uint8_t *bytes, size_t count)=0
Write bytes to memory.
virtual void start_session(bool force=true)=0
Start a session of operations (reads, writes, erases, size gets/sets).
void set_delegate(Delegate *delegate)
Set the delegate that will receive events generated by this EEPROM.
The NFCEEPROMDriver delegate.
virtual void on_size_read(bool success, size_t size)=0
Completion of size retrieval operation.
virtual void on_size_written(bool success)=0
Completion of size setting operation.
virtual void on_bytes_written(size_t count)=0
Completion of write operation.
virtual void on_session_started(bool success)=0
Completion of session start operation.
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.
virtual void on_session_ended(bool success)=0
Completion of session end operation.