MHVLib
20111011
An efficiency oriented runtime library for AVR microcontrollers
|
#include <MHV_EEPROM.h>
Public Member Functions | |
MHV_EEPROM () | |
int16_t | read (uint16_t address) |
uint8_t | busyRead (uint16_t address) |
int8_t | read (void *buffer, uint16_t address, uint16_t length) |
void | busyRead (void *buffer, uint16_t address, uint16_t length) |
int8_t | write (uint16_t address, uint8_t data) |
int8_t | busyWrite (void *buffer, uint16_t address, uint16_t length) |
int8_t | write (void *buffer, uint16_t address, uint16_t length, void(*doneCallback)(void *buffer, void *data), void *doneCallbackData) |
void | writeInterrupt () |
bool | isBusy () |
Definition at line 46 of file MHV_EEPROM.h.
MHV_EEPROM::MHV_EEPROM | ( | ) |
Create a new EEPROM access class
Definition at line 33 of file MHV_EEPROM.cpp.
uint8_t MHV_EEPROM::busyRead | ( | uint16_t | address | ) |
Read a byte from EEPROM, waiting until the EEPROM is available
address | the address to read from |
Definition at line 66 of file MHV_EEPROM.cpp.
void MHV_EEPROM::busyRead | ( | void * | buffer, |
uint16_t | address, | ||
uint16_t | length | ||
) |
Read a buffer from EEPROM, waiting until the EEPROM is available
buffer | the buffer to populate |
address | the address to read from |
length | the number of bytes to read |
Definition at line 103 of file MHV_EEPROM.cpp.
int8_t MHV_EEPROM::busyWrite | ( | void * | buffer, |
uint16_t | address, | ||
uint16_t | length | ||
) |
Write a buffer to EEPROM
buffer | the buffer to read from |
address | the address to write to |
length | the number of bytes to write |
Definition at line 134 of file MHV_EEPROM.cpp.
bool MHV_EEPROM::isBusy | ( | ) |
Check if the EEPROM hardware is busy
Definition at line 216 of file MHV_EEPROM.cpp.
int16_t MHV_EEPROM::read | ( | uint16_t | address | ) |
Read a byte from EEPROM
address | the address to read from |
Definition at line 47 of file MHV_EEPROM.cpp.
int8_t MHV_EEPROM::read | ( | void * | buffer, |
uint16_t | address, | ||
uint16_t | length | ||
) |
Read a buffer from EEPROM
buffer | the buffer to populate |
address | the address to read from |
length | the number of bytes to read |
Definition at line 79 of file MHV_EEPROM.cpp.
int8_t MHV_EEPROM::write | ( | uint16_t | address, |
uint8_t | data | ||
) |
Write a byte to EEPROM
address | the address to write to |
data | the byte to write |
Definition at line 113 of file MHV_EEPROM.cpp.
int8_t MHV_EEPROM::write | ( | void * | buffer, |
uint16_t | address, | ||
uint16_t | length, | ||
void(*)(void *buffer, void *data) | doneCallback, | ||
void * | doneCallbackData | ||
) |
Write a buffer to EEPROM
buffer | the buffer to read from |
address | the address to write to |
length | the number of bytes to write (must be greater than 0) |
doneCallback | A callback to call when the buffer has been written (can be NULL) |
doneCallbackData | A pointer to pass to the callback |
Definition at line 164 of file MHV_EEPROM.cpp.
void MHV_EEPROM::writeInterrupt | ( | ) |
Interrupt handler for async writes
Definition at line 192 of file MHV_EEPROM.cpp.