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.
- Flash configuration functions:
- Functions to read/write the flash:
- Miscellaneous functions:
uint8_t flash_byte_read |
( |
maddr_t |
addr | ) |
|
Reads one byte from the flash of the device.
- Parameters
-
[in] | addr | the address to read the byte from. |
- Return values
-
int flash_config |
( |
void |
| ) |
|
Initializes the flash enabling the clock.
- Return values
-
int flash_erase_page |
( |
maddr_t |
addr | ) |
|
Erases a page of the flash.
- Parameters
-
addr | the address to start the erasing process. |
- Return values
-
EOI | access error. |
0 | on success. |
Writes an array of bytes in the flash of the module.
- Parameters
-
[in] | addr | address of the flash to start to writing process. |
[in] | buf | buffer containing the bytes to write in the flash. |
[in] | len | number of bytes to write from the buffer. |
- Return values
-
EIO | access error. |
ssize_t | the 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] | addr | the address where the byte will be written. |
[in] | data | the byte to write. |
- Return values
-
EIO | access error. |
1 | on success. |