Go to the source code of this file.
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 NO_STDIO_NUT_WRAPPER |
void unix_eeprom_acces | ( | const void * | addr | ) |
Definition at line 56 of file eeprom.c.
References fclose(), fopen(), fseek(), printf, and SEEK_SET.
Referenced by eeprom_read_block(), eeprom_read_byte(), eeprom_read_word(), and eeprom_write_byte().
void eeprom_write_byte | ( | unsigned char * | addr, | |
unsigned char | val | |||
) |
write a byte val
to EEPROM address addr
Definition at line 76 of file eeprom.c.
References fflush(), fwrite(), and unix_eeprom_acces().
void eeprom_read_block | ( | void * | buf, | |
const void * | addr, | |||
size_t | n | |||
) |
read a block of n
bytes from EEPROM address addr
to buf
Definition at line 86 of file eeprom.c.
References fread(), and unix_eeprom_acces().
uint8_t eeprom_read_byte | ( | const unsigned char * | addr | ) |
read one byte from EEPROM address addr
Definition at line 100 of file eeprom.c.
References fread(), and unix_eeprom_acces().
uint16_t eeprom_read_word | ( | const unsigned short * | addr | ) |
read one 16-bit word (little endian) from EEPROM address addr
Definition at line 113 of file eeprom.c.
References fread(), and unix_eeprom_acces().
int NutNvMemLoad | ( | unsigned int | addr, | |
void * | buff, | |||
size_t | siz | |||
) |
Load data from AVR EEPROM.
Definition at line 129 of file eeprom.c.
References eeprom_read_block.
int NutNvMemSave | ( | unsigned int | addr, | |
const void * | buff, | |||
size_t | len | |||
) |
Save data in AVR EEPROM.
Definition at line 140 of file eeprom.c.
References eeprom_read_byte, and eeprom_write_byte.