XBee Firmware Library  1.6.0
Functions
Virtual EEPROM

Functions

size_t veeprom_get_size (void)
 Returns the size of the virtual EEPROM. More...
 
int veeprom_init (void)
 Initializes the virtual EEPROM in the flash of the device. More...
 
ssize_t veeprom_read (void *buf, maddr_t offset, size_t len)
 Reads the content of selected virtual EEPROM. More...
 
ssize_t veeprom_write (const void *buf, maddr_t offset, size_t len)
 Writes an array of bytes in the virtual EEPROM. More...
 

Detailed Description

Platform-specific layer provides a consistent Virtual EEPROM API to upper layers of the driver.

EEPROM API Overview

This API contains the functions to control a virtual EEPROM implementation over the flash memory of the Programmable XBee devices. The virtual EEPROM is a user-modifiable read-only memory (ROM) that has been implemented over the processor flash. It can be erased and reprogrammed (written to) repeatedly.

Function Documentation

size_t veeprom_get_size ( void  )

Returns the size of the virtual EEPROM.

Parameters
None
Return values
size_tthe size in bytes of the virtual EEPROM.
int veeprom_init ( void  )

Initializes the virtual EEPROM in the flash of the device.

Parameters
None
Return values
0on success.
<0if there is an error in the initialization process.
ssize_t veeprom_read ( void *  buf,
maddr_t  offset,
size_t  len 
)

Reads the content of selected virtual EEPROM.

Parameters
[out]bufbuffer where the read bytes will be stored.
[in]offsetaddress of the virtual EEPROM to start reading from.
[in]lennumber of bytes to read.
Return values
ssize_tthe number of bytes read.
EINVALinvalid offset parameter.
ssize_t veeprom_write ( const void *  buf,
maddr_t  offset,
size_t  len 
)

Writes an array of bytes in the virtual EEPROM.

Parameters
[in]bufbuffer containing the bytes to be written.
[in]offsetaddress of the virtual EEPROM to start the writing process.
[in]lennumber of bytes to write from the buffer.
Return values
ssize_tnumber of bytes that were written.
EINVALinvalid offset parameter.