Non-Volatile Memory
[Device Driver API.]

Collaboration diagram for Non-Volatile Memory:

Detailed Description

Read data from and write data to non-volatile memory.

Non-volatile data memory is typically used to store configuration settings. Nut/OS currently supports three types of non-volatile storage:

Nut/OS uses non-volatile memory to store the _CONFOS structure at location CONFNET_EE_OFFSET and the _CONFNET structure at location CONFNET_EE_OFFSET.


Modules

 AVR EEPROM
 AVR on-chip EEPROM support.

Functions

int NutNvMemLoad (u_int addr, void *buff, size_t siz)
 Read data from non-volatile memory.
int NutNvMemSave (u_int addr, CONST void *buff, size_t len)
 Save data in non-volatile memory.


Function Documentation

int NutNvMemLoad ( u_int  addr,
void *  buff,
size_t  siz 
)

Read data from non-volatile memory.

This routine provides platform independent access to non-volatile configuration data.

Parameters:
addr Location to read from.
buff Pointer to a buffer that receives the data.
siz Number of bytes to read.
Returns:
0 on success, -1 otherwise.

Definition at line 96 of file nvmem.c.

References At45dbParamRead(), At49bvParamRead(), At91EfcParamRead(), OnChipNvMemLoad(), and X12EepromRead().

Referenced by findenv(), NutLoadConfig(), and NutNetLoadConfig().

int NutNvMemSave ( u_int  addr,
CONST void *  buff,
size_t  len 
)

Save data in non-volatile memory.

This routine provides platform independent access to non-volatile configuration data.

Parameters:
addr Location to write to.
buff Pointer to a buffer that contains the data.
len Number of bytes to write.
Returns:
0 on success, -1 otherwise.

Definition at line 125 of file nvmem.c.

References At45dbParamWrite(), At49bvParamWrite(), At91EfcParamWrite(), OnChipNvMemSave(), and X12EepromWrite().

Referenced by NutNetSaveConfig(), and NutSaveConfig().


© 2000-2007 by egnite Software GmbH - visit http://www.ethernut.de/