Contiki-NG
Loading...
Searching...
No Matches

Functions

bool eeprom_write (eeprom_addr_t addr, const unsigned char *buf, size_t size)
 Write a buffer into EEPROM.
 
bool eeprom_read (eeprom_addr_t addr, unsigned char *buf, size_t size)
 Read data from the EEPROM.
 
bool eeprom_init (void)
 Initialize the EEPROM module.
 

Detailed Description

The EEPROM API defines a common interface for EEPROM access.

A platform with EEPROM support must implement this API.

Function Documentation

◆ eeprom_init()

bool eeprom_init ( void )

Initialize the EEPROM module.

This function initializes the EEPROM module and is called from the bootup code.

Returns
a boolean indicating whether the operation succeeded.

Definition at line 79 of file eeprom.c.

◆ eeprom_read()

bool eeprom_read ( eeprom_addr_t addr,
unsigned char * buf,
size_t size )

Read data from the EEPROM.

This function reads a number of bytes from the specified address in EEPROM and into a buffer in memory.

Parameters
addrThe address in EEPROM from which the data should be read.
bufA pointer to the buffer to which the data should be stored.
sizeThe number of bytes to read.
Returns
a boolean indicating whether the operation succeeded.

Definition at line 168 of file eeprom.c.

References addr.

◆ eeprom_write()

bool eeprom_write ( eeprom_addr_t addr,
const unsigned char * buf,
size_t size )

Write a buffer into EEPROM.

This function writes a buffer of the specified size into EEPROM.

Parameters
addrThe address in EEPROM to which the buffer should be written.
bufA pointer to the buffer from which data is to be read.
sizeThe number of bytes to write into EEPROM.
Returns
a boolean indicating whether the operation succeeded.

Definition at line 142 of file eeprom.c.

References addr.