avr/cpp/EEPROM.h File Reference

#include "IO.h"

Go to the source code of this file.

Namespaces

namespace  AVRCpp
namespace  AVRCpp::EEPROM
namespace  AVRCpp::EEPROM::Internal

Classes

struct  AVRCpp::EEPROM::ReadyInterrupt
 The EEPROM Ready interrupt generates a constant interrupt when the write access time has elapsed. More...

Defines

#define __EEPROM_SIMPLE__   0x00
#define __EEPROM_ERASEBLE__   0x01
#define __EEPROM_NEW_NAMES__   0x02
#define __EEPROM_OLD_FLASH__   0x04
#define __EEPROM_LONG_FLASH__   0x08
#define __EEPROM_PROPERTIES__   (__EEPROM_SIMPLE__ | __EEPROM_NEW_NAMES__ | __EEPROM_ERASEBLE__ | __EEPROM_LONG_FLASH__)
#define EEPROM_SIZE   E2END
#define EE_RDY_ns   EEPROM
#define EE_RDY_struct   EE_RDY_ns::ReadyInterrupt
#define __EEMPE__   _EEMPE
#define __EEPE__   _EEPE
#define __SPMEN__   _SELFPRGEN
#define __SPMCSR__   _SPMCSR

Enumerations

enum  AVRCpp::EEPROM::Mode {
  AVRCpp::EEPROM::EraseOnly = 0x10,
  AVRCpp::EEPROM::WriteOnly = 0x20,
  AVRCpp::EEPROM::EraseAndWrite = 0x10 | 0x20
}

Functions

bool AVRCpp::EEPROM::IsWriting ()
 Returns true if writing proccess is taking place.
void AVRCpp::EEPROM::WaitWhileWriting ()
 Blocks while writing proccess is present.
void AVRCpp::EEPROM::SetAddressUnsafe (uint16_t address)
 Tries to set address even if previous writing operation has not finished.
void AVRCpp::EEPROM::SetAddress (uint16_t address)
 Waits for previous writing operation to finish, then sets address.
uint16_t AVRCpp::EEPROM::GetAddress ()
 Returns current address.
void AVRCpp::EEPROM::Write (uint8_t data)
 Writes data to previously set address. It must not be interrupted by another request to read or write.
void AVRCpp::EEPROM::Write (uint16_t address, uint8_t data)
 Writes data to given address. It must not be interrupted by another request to read or write.
bool AVRCpp::EEPROM::MoveNext ()
 Increments current address unless it is pointing to the last byte in EEPROM memory.
uint8_t AVRCpp::EEPROM::Read ()
 Read one byte from previously set (current) address.
uint8_t AVRCpp::EEPROM::Read (uint16_t address)
 Read one byte from given address.
void AVRCpp::EEPROM::SetMode (Mode mode)
 Sets EEPROM writing mode.
uint8_t AVRCpp::EEPROM::GetMode ()
 Returns EEPROM writing mode.
bool AVRCpp::EEPROM::Erase (uint16_t numberOfBytes)
 Erase array of data from previously set address. After this operation, the address is set to the byte after last erased byte.
bool AVRCpp::EEPROM::Internal::LoadingProcess (uint16_t lastByteAddr, uint8_t *uint8Data)
bool AVRCpp::EEPROM::Internal::SavingProcess (uint16_t lastByteAddr, uint8_t *uint8Data)
template<typename T>
static bool AVRCpp::EEPROM::Internal::LoadSaveOperation (bool isSaving, T *data, uint16_t elementsCount)
template<typename T>
bool AVRCpp::EEPROM::Save (T data)
 Saves data to EEPROM to the current address.
template<typename T>
bool AVRCpp::EEPROM::Load (T &data)
 Reads data from EEPROM from the current address.
template<typename T>
bool AVRCpp::EEPROM::SaveArray (T *data, uint16_t elementsCount)
 Save array of data to previously set address.
template<typename T>
bool AVRCpp::EEPROM::LoadArray (T *data, uint16_t elementsCount)
 Load array of data from previously set address.


Define Documentation

#define __EEMPE__   _EEMPE

Definition at line 77 of file EEPROM.h.

#define __EEPE__   _EEPE

Definition at line 78 of file EEPROM.h.

#define __EEPROM_ERASEBLE__   0x01

Definition at line 33 of file EEPROM.h.

#define __EEPROM_LONG_FLASH__   0x08

Definition at line 36 of file EEPROM.h.

#define __EEPROM_NEW_NAMES__   0x02

Definition at line 34 of file EEPROM.h.

#define __EEPROM_OLD_FLASH__   0x04

Definition at line 35 of file EEPROM.h.

#define __EEPROM_PROPERTIES__   (__EEPROM_SIMPLE__ | __EEPROM_NEW_NAMES__ | __EEPROM_ERASEBLE__ | __EEPROM_LONG_FLASH__)

Definition at line 53 of file EEPROM.h.

#define __EEPROM_SIMPLE__   0x00

Definition at line 32 of file EEPROM.h.

#define __SPMCSR__   _SPMCSR

Definition at line 97 of file EEPROM.h.

#define __SPMEN__   _SELFPRGEN

Definition at line 89 of file EEPROM.h.

#define EE_RDY_ns   EEPROM

Definition at line 67 of file EEPROM.h.

#define EE_RDY_struct   EE_RDY_ns::ReadyInterrupt

Definition at line 68 of file EEPROM.h.

#define EEPROM_SIZE   E2END

Definition at line 65 of file EEPROM.h.


Generated on Sat Sep 15 23:40:58 2007 for AVR C++ Lib for ATmega48 by  doxygen 1.5.2
SourceForge.net Logo MTÜ TTÜ Robotiklubi