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.
i2c_eeprom Class Reference
I2C EEPROM access class. More...
#include <i2c_eeprom.h>
Public Member Functions | |
| i2c_eeprom (int hwAddr, int speed) | |
| Initialize communication. | |
| void | write (char *data, uint16_t iAddr, unsigned int n) |
| Write to I2C EEPROM. | |
| void | read (uint16_t iAddr, uint16_t n, char *out) |
| Read from I2C EEPROM. | |
Detailed Description
I2C EEPROM access class.
This class is used for communication with I2C EEPROM chip.
Definition at line 29 of file i2c_eeprom.h.
Constructor & Destructor Documentation
| i2c_eeprom | ( | int | hwAddr, |
| int | speed | ||
| ) |
Initialize communication.
- Parameters:
-
hwAddr Harware address of the I2C EEPROM chip. speed I2C bus speed.
Definition at line 18 of file i2c_eeprom.cpp.
Member Function Documentation
| void read | ( | uint16_t | iAddr, |
| uint16_t | n, | ||
| char * | out | ||
| ) |
Read from I2C EEPROM.
Read any length of bytes from external EEPROM.
- Parameters:
-
iAddr Memory address. n Read n bytes. *out Returns array of bytes.
Definition at line 71 of file i2c_eeprom.cpp.
| void write | ( | char * | data, |
| uint16_t | iAddr, | ||
| unsigned int | n | ||
| ) |
Write to I2C EEPROM.
Write any length of bytes to external EEPROM.
- Parameters:
-
*data Array of bytes. iAddr Memory address. n Write n bytes.
Definition at line 28 of file i2c_eeprom.cpp.
Generated on Tue Jul 19 2022 05:47:57 by
1.7.2