Nut/OS  4.10.3
API Reference
Non-Volatile Memory

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

Collaboration diagram for Non-Volatile Memory:

Modules

 AVR EEPROM
 

AVR on-chip EEPROM support.


Functions

int NutNvMemLoad (unsigned int addr, void *buff, size_t siz)
 Read data from non-volatile memory.
int NutNvMemSave (unsigned int addr, CONST void *buff, size_t len)
 Save data in 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.


Function Documentation

int NutNvMemLoad ( unsigned 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:
addrLocation to read from.
buffPointer to a buffer that receives the data.
sizNumber of bytes to read.
Returns:
0 on success, -1 otherwise.

Definition at line 107 of file nvmem.c.

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

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

Here is the call graph for this function:

int NutNvMemSave ( unsigned 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:
addrLocation to write to.
buffPointer to a buffer that contains the data.
lenNumber of bytes to write.
Returns:
0 on success, -1 otherwise.

Definition at line 140 of file nvmem.c.

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

Referenced by NutNetSaveConfig(), and NutSaveConfig().

Here is the call graph for this function: