Mistake on this page?
Report an issue in GitHub or email us
Data Structures | Public Member Functions
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. More...
 
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. More...
 
void set_event_queue (events::EventQueue *queue)
 Set the event queue that will be used to schedule event handling. More...
 

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. To enable the async mode ManageI2CGPO(I2C_ANSWER_READY) function must be called. When the component notifies an interrupt user must call ManageEvent function. Note that passing a parameter other than I2C_ANSWER_READY to ManageI2CGPO initialize the component in sync mode.

Definition at line 232 of file m24sr_driver.h.

Constructor & Destructor Documentation

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

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

Implements NFCEEPROMDriver.

Definition at line 491 of file m24sr_driver.h.

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

Implements NFCEEPROMDriver.

Definition at line 613 of file m24sr_driver.h.

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

Implements NFCEEPROMDriver.

Definition at line 499 of file m24sr_driver.h.

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

Implements NFCEEPROMDriver.

Definition at line 470 of file m24sr_driver.h.

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

Implements NFCEEPROMDriver.

Definition at line 599 of file m24sr_driver.h.

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

Implements NFCEEPROMDriver.

Definition at line 461 of file m24sr_driver.h.

void set_delegate ( Delegate delegate)
inherited

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

Parameters
[in]delegatethe delegate instance to use
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
virtual void start_session ( bool  force = true)
virtual
See also
NFCEEPROMDriver::start_session

Implements NFCEEPROMDriver.

Definition at line 477 of file m24sr_driver.h.

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 534 of file m24sr_driver.h.

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

Implements NFCEEPROMDriver.

Definition at line 573 of file m24sr_driver.h.

Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.