XBee Firmware Library  1.6.0
Functions

Functions

uint8_t flash_byte_read (maddr_t addr)
 Reads one byte from the flash of the device. More...
 
int flash_config (void)
 Initializes the flash enabling the clock. More...
 
int flash_erase_page (maddr_t addr)
 Erases a page of the flash. More...
 
ssize_t flash_prog (maddr_t addr, uint8_t *buf, size_t len)
 Writes an array of bytes in the flash of the module. More...
 
int flash_prog_byte (maddr_t addr, uint8_t *data)
 Writes one byte in the flash of the device. More...
 

Detailed Description

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

Flash API Overview

This API contains some functions to configure and control the on-chip nonvolatile memory of the programmable XBee devices.

Function Documentation

uint8_t flash_byte_read ( maddr_t  addr)

Reads one byte from the flash of the device.

Parameters
[in]addrthe address to read the byte from.
Return values
uint8_tthe byte read.
int flash_config ( void  )

Initializes the flash enabling the clock.

Return values
0on success.
int flash_erase_page ( maddr_t  addr)

Erases a page of the flash.

Parameters
addrthe address to start the erasing process.
Return values
EOIaccess error.
0on success.
ssize_t flash_prog ( maddr_t  addr,
uint8_t buf,
size_t  len 
)

Writes an array of bytes in the flash of the module.

Parameters
[in]addraddress of the flash to start to writing process.
[in]bufbuffer containing the bytes to write in the flash.
[in]lennumber of bytes to write from the buffer.
Return values
EIOaccess error.
ssize_tthe number of bytes that were written.
int flash_prog_byte ( maddr_t  addr,
uint8_t data 
)

Writes one byte in the flash of the device.

Parameters
[in]addrthe address where the byte will be written.
[in]datathe byte to write.
Return values
EIOaccess error.
1on success.