|
Arduino-TWI
Two-Wire Interface (TWI) library for Arduino
|
#include <AT24CXX.h>


Public Member Functions | |
| AT24CXX (TWI &twi, uint8_t subaddr=0, const size_t size=32, const uint16_t page_max=32) | |
| bool | is_ready () |
| int | read (void *dest, uint16_t src, size_t count) |
| int | write (uint16_t dest, const void *src, size_t count) |
Public Attributes | |
| const uint16_t | PAGE_MAX |
| const uint16_t | PAGE_MASK |
| const size_t | SIZE |
Protected Member Functions | |
| bool | acquire () |
| bool | release () |
| int | read (void *buf, size_t count) |
| int | write (const void *buf, size_t count) |
| int | write (iovec_t *vp) |
Protected Attributes | |
| TWI & | m_twi |
| uint8_t | m_addr |
Driver for the AT24CXX 2-Wire Serial EEPROM. Allows page write and block read. Supports device AT24C32 (8K) to AT24C512 (64K). Default AT24CXX device is AT24C32.
The TinyRTC with DS1307 also contains a 24C32 EEPROM.
|
inline |
|
inlineinherited |
|
inline |
|
inlineinherited |
|
inline |
Read eeprom block with the given size into the buffer from the address. Return number of bytes read or negative error code.
| [in] | dest | buffer to read from eeprom. |
| [in] | src | address in eeprom to read from. |
| [in] | count | number of bytes to read. |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inline |
Write eeprom block at given address with the contents from the buffer. Return number of bytes written or negative error code.
| [in] | dest | address in eeprom to read write to. |
| [in] | src | buffer to write to eeprom. |
| [in] | count | number of bytes to write. |
|
protectedinherited |
|
protectedinherited |
| const uint16_t AT24CXX::PAGE_MAX |