#include <sys/types.h>
Go to the source code of this file.
Functions | |
size_t | SpiAt45dConfigSize (void) |
Get size of configuration area. | |
int | SpiAt45dConfigRead (size_t pos, void *data, size_t len) |
Load configuration parameters from flash memory. | |
int | SpiAt45dConfigWrite (size_t pos, CONST void *data, size_t len) |
Store configuration parameters in flash memory. |
size_t SpiAt45dConfigSize | ( | void | ) |
Get size of configuration area.
A part of the DataFlash may be used to store configuration parameters, like the network interface MAC address, the local hostname etc. The size of this area may be configured by defining NUT_CONFIG_AT45D_SIZE. Otherwise one full page is used.
Definition at line 134 of file nvmem_at45d.c.
References SpiAt45dPageSize().
Referenced by ShowHardwareConfiguration(), SpiAt45dConfigRead(), and SpiAt45dConfigWrite().
int SpiAt45dConfigRead | ( | size_t | pos, |
void * | data, | ||
size_t | len | ||
) |
Load configuration parameters from flash memory.
pos | Start location within configuration sector. |
data | Points to a buffer that receives the contents. |
len | Number of bytes to read. |
Definition at line 157 of file nvmem_at45d.c.
References free(), malloc(), memcpy(), SpiAt45dConfigSize(), and SpiAt45dPageRead().
Referenced by NutNvMemLoad().
int SpiAt45dConfigWrite | ( | size_t | pos, |
CONST void * | data, | ||
size_t | len | ||
) |
Store configuration parameters in flash memory.
pos | Start location within configuration sector. |
data | Points to a buffer that contains the bytes to store. |
len | Number of bytes to store. |
Definition at line 187 of file nvmem_at45d.c.
References free(), malloc(), memcmp(), memcpy(), SpiAt45dConfigSize(), SpiAt45dPageRead(), SpiAt45dPageSize(), SpiAt45dPageWrite(), and wsize.
Referenced by NutNvMemSave().