Nut/OS  5.0.5
API Reference
eeprom.c File Reference
#include <stdio.h>
#include <sys/types.h>
Include dependency graph for eeprom.c:

Defines

#define NO_STDIO_NUT_WRAPPER
 Provides the avr eeprom api. It uses the file 'btnode_eerpom.bin' to store its content.

Functions

void unix_eeprom_acces (const void *addr)
void eeprom_write_byte (unsigned char *addr, unsigned char val)
void eeprom_read_block (void *buf, const void *addr, size_t n)
uint8_t eeprom_read_byte (const unsigned char *addr)
uint16_t eeprom_read_word (const unsigned short *addr)
int NutNvMemLoad (unsigned int addr, void *buff, size_t siz)
 Load data from AVR EEPROM.
int NutNvMemSave (unsigned int addr, const void *buff, size_t len)
 Save data in AVR EEPROM.

Define Documentation

#define NO_STDIO_NUT_WRAPPER

Provides the avr eeprom api. It uses the file 'btnode_eerpom.bin' to store its content.


Function Documentation

void unix_eeprom_acces ( const void *  addr)

References fclose(), fopen(), fseek(), printf, and SEEK_SET.

Referenced by eeprom_read_block(), eeprom_read_byte(), eeprom_read_word(), and eeprom_write_byte().

Here is the call graph for this function:

void eeprom_write_byte ( unsigned char *  addr,
unsigned char  val 
)

write a byte val to EEPROM address addr

References fflush(), fwrite(), and unix_eeprom_acces().

Here is the call graph for this function:

void eeprom_read_block ( void *  buf,
const void *  addr,
size_t  n 
)

read a block of n bytes from EEPROM address addr to buf

References fread(), and unix_eeprom_acces().

Here is the call graph for this function:

uint8_t eeprom_read_byte ( const unsigned char *  addr)

read one byte from EEPROM address addr

References fread(), and unix_eeprom_acces().

Here is the call graph for this function:

uint16_t eeprom_read_word ( const unsigned short *  addr)

read one 16-bit word (little endian) from EEPROM address addr

References fread(), and unix_eeprom_acces().

Here is the call graph for this function:

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

Load data from AVR EEPROM.

Returns:
Allways 0.

References eeprom_read_block.

int NutNvMemSave ( unsigned int  addr,
const void *  buff,
size_t  len 
)

Save data in AVR EEPROM.

Returns:
Allways 0.

References eeprom_read_byte, and eeprom_write_byte.