MHVLib  20111011
An efficiency oriented runtime library for AVR microcontrollers
MHV_EEPROM Class Reference

#include <MHV_EEPROM.h>

List of all members.

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 ()

Detailed Description

Definition at line 46 of file MHV_EEPROM.h.


Constructor & Destructor Documentation

MHV_EEPROM::MHV_EEPROM ( )

Create a new EEPROM access class

Definition at line 33 of file MHV_EEPROM.cpp.


Member Function Documentation

uint8_t MHV_EEPROM::busyRead ( uint16_t  address)

Read a byte from EEPROM, waiting until the EEPROM is available

Parameters:
addressthe address to read from
Returns:
the byte

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

Parameters:
bufferthe buffer to populate
addressthe address to read from
lengththe 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

Parameters:
bufferthe buffer to read from
addressthe address to write to
lengththe 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

Returns:
true 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

Parameters:
addressthe address to read from
Returns:
the byte, or MHV_EEPROM_BUSY if the EEPROM is busy

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

Parameters:
bufferthe buffer to populate
addressthe address to read from
lengththe 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

Parameters:
addressthe address to write to
datathe byte to write
Returns:
MHV_EEPROM_BUSY if the EEPROM is busy

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

Parameters:
bufferthe buffer to read from
addressthe address to write to
lengththe number of bytes to write (must be greater than 0)
doneCallbackA callback to call when the buffer has been written (can be NULL)
doneCallbackDataA 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.


The documentation for this class was generated from the following files: