Nut/OS  5.0.5
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.

Load data from AVR EEPROM.

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.

References At45dbParamRead(), At49bvParamRead(), At91EfcParamRead(), EEInit(), EEReadData(), Lpc177x_8x_EepromRead(), Lpc17xxIapParamRead(), 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.

Save data in AVR EEPROM.

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.

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

Referenced by NutNetSaveConfig(), and NutSaveConfig().

Here is the call graph for this function: