Mbed OS Reference
Loading...
Searching...
No Matches
M24srDriver Class Reference

Class representing a M24SR component. More...

#include <m24sr_driver.h>

Inheritance diagram for M24srDriver:
NFCEEPROMDriver

Data Structures

class  Callbacks
 Object that contains all the callbacks fired by this class, each command has its own callback. More...
 

Public Member Functions

 M24srDriver (PinName i2c_data_pin=NC, PinName i2c_clock_pin=NC, PinName gpo_pin=NC, PinName rf_disable_pin=NC)
 Create the driver, default pin names will be used appropriate for the board.
 
virtual void reset ()
 
virtual size_t read_max_size ()
 
virtual void start_session (bool force=true)
 
virtual void end_session ()
 
virtual void read_bytes (uint32_t address, uint8_t *bytes, size_t count)
 
virtual void write_bytes (uint32_t address, const uint8_t *bytes, size_t count)
 
virtual void write_size (size_t count)
 
virtual void read_size ()
 
virtual void erase_bytes (uint32_t address, size_t size)
 
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.
 

Detailed Description

Class representing a M24SR component.

This component has two operation modes, sync or async. In sync mode each function call returns only after the command has completed. In async mode each function call returns immediately and the answer will be notified through a callback. The default behaviour is sync mode.

Definition at line 229 of file m24sr_driver.h.

Constructor & Destructor Documentation

◆ M24srDriver()

M24srDriver ( PinName  i2c_data_pin = NC,
PinName  i2c_clock_pin = NC,
PinName  gpo_pin = NC,
PinName  rf_disable_pin = NC 
)

Create the driver, default pin names will be used appropriate for the board.

Parameters
i2c_data_pinI2C data pin name.
i2c_clock_pinI2C clock pin name.
gpo_pinI2C GPO pin name.
rf_disable_pinpin name for breaking the RF connection.

Member Function Documentation

◆ reset()

virtual void reset ( )
virtual
See also
NFCEEPROMDriver::reset

Implements NFCEEPROMDriver.

Definition at line 458 of file m24sr_driver.h.

◆ read_max_size()

virtual size_t read_max_size ( )
virtual
See also
NFCEEPROMDriver::get_max_size

Implements NFCEEPROMDriver.

Definition at line 467 of file m24sr_driver.h.

◆ start_session()

virtual void start_session ( bool  force = true)
virtual
See also
NFCEEPROMDriver::start_session

Implements NFCEEPROMDriver.

Definition at line 474 of file m24sr_driver.h.

◆ end_session()

virtual void end_session ( )
virtual
See also
NFCEEPROMDriver::end_session

Implements NFCEEPROMDriver.

Definition at line 488 of file m24sr_driver.h.

◆ read_bytes()

virtual void read_bytes ( uint32_t  address,
uint8_t *  bytes,
size_t  count 
)
virtual
See also
NFCEEPROMDriver::read_bytes

Implements NFCEEPROMDriver.

Definition at line 496 of file m24sr_driver.h.

◆ write_bytes()

virtual void write_bytes ( uint32_t  address,
const uint8_t *  bytes,
size_t  count 
)
virtual
See also
NFCEEPROMDriver::write_bytes

Implements NFCEEPROMDriver.

Definition at line 531 of file m24sr_driver.h.

◆ write_size()

virtual void write_size ( size_t  count)
virtual
See also
NFCEEPROMDriver::set_size

Implements NFCEEPROMDriver.

Definition at line 570 of file m24sr_driver.h.

◆ read_size()

virtual void read_size ( )
virtual
See also
NFCEEPROMDriver::get_size

Implements NFCEEPROMDriver.

Definition at line 596 of file m24sr_driver.h.

◆ erase_bytes()

virtual void erase_bytes ( uint32_t  address,
size_t  size 
)
virtual
See also
NFCEEPROMDriver::erase_bytes

Implements NFCEEPROMDriver.

Definition at line 610 of file m24sr_driver.h.

◆ set_delegate()

void set_delegate ( Delegate delegate)
inherited

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

Parameters
[in]delegatethe delegate instance to use

◆ set_event_queue()

void set_event_queue ( events::EventQueue queue)
inherited

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

Parameters
[in]queuethe queue instance to use