![]() |
libbladeRF 2.6.0
Nuand bladeRF library
|
These functions provide the ability to erase, read, and write the SPI flash.
These functions are thread-safe.
Functions | |
| API_EXPORT int CALL_CONV | bladerf_erase_flash (struct bladerf *dev, uint32_t erase_block, uint32_t count) |
| API_EXPORT int CALL_CONV | bladerf_erase_flash_bytes (struct bladerf *dev, uint32_t address, uint32_t length) |
| API_EXPORT int CALL_CONV | bladerf_read_flash (struct bladerf *dev, uint8_t *buf, uint32_t page, uint32_t count) |
| API_EXPORT int CALL_CONV | bladerf_read_flash_bytes (struct bladerf *dev, uint8_t *buf, uint32_t address, uint32_t bytes) |
| API_EXPORT int CALL_CONV | bladerf_write_flash (struct bladerf *dev, const uint8_t *buf, uint32_t page, uint32_t count) |
| API_EXPORT int CALL_CONV | bladerf_write_flash_bytes (struct bladerf *dev, const uint8_t *buf, uint32_t address, uint32_t length) |
| API_EXPORT int CALL_CONV | bladerf_lock_otp (struct bladerf *dev) |
| API_EXPORT int CALL_CONV | bladerf_read_otp (struct bladerf *dev, uint8_t *buf) |
| API_EXPORT int CALL_CONV | bladerf_write_otp (struct bladerf *dev, uint8_t *buf) |
| API_EXPORT int CALL_CONV bladerf_erase_flash | ( | struct bladerf * | dev, |
| uint32_t | erase_block, | ||
| uint32_t | count ) |
Erase regions of the bladeRF's SPI flash
| dev | Device handle | |
| [in] | erase_block | Erase block from which to start erasing |
| [in] | count | Number of blocks to erase |
| API_EXPORT int CALL_CONV bladerf_erase_flash_bytes | ( | struct bladerf * | dev, |
| uint32_t | address, | ||
| uint32_t | length ) |
Erase regions of the bladeRF's SPI flash
| dev | Device handle | |
| [in] | address | Address at which to start erasing |
| [in] | length | Number of bytes to erase |
| API_EXPORT int CALL_CONV bladerf_lock_otp | ( | struct bladerf * | dev | ) |
Lock the bladeRF's OTP
| dev | Device handle |
| API_EXPORT int CALL_CONV bladerf_read_flash | ( | struct bladerf * | dev, |
| uint8_t * | buf, | ||
| uint32_t | page, | ||
| uint32_t | count ) |
Read data from the bladeRF's SPI flash
| dev | Device handle | |
| [in] | buf | Buffer to read data into. Must be count * flash-page-size bytes or larger. |
| [in] | page | Page to begin reading from |
| [in] | count | Number of pages to read |
| API_EXPORT int CALL_CONV bladerf_read_flash_bytes | ( | struct bladerf * | dev, |
| uint8_t * | buf, | ||
| uint32_t | address, | ||
| uint32_t | bytes ) |
Read data from the bladeRF's SPI flash
| dev | Device handle | |
| [in] | buf | Buffer to read data into. Must be bytes bytes or larger. |
| [in] | address | Address to begin reading from |
| [in] | bytes | Number of bytes to read |
| API_EXPORT int CALL_CONV bladerf_read_otp | ( | struct bladerf * | dev, |
| uint8_t * | buf ) |
Read data from the bladeRF's SPI flash OTP
| dev | Device handle | |
| [in] | buf | Buffer to read OTP data into |
| API_EXPORT int CALL_CONV bladerf_write_flash | ( | struct bladerf * | dev, |
| const uint8_t * | buf, | ||
| uint32_t | page, | ||
| uint32_t | count ) |
Write data to the bladeRF's SPI flash device
| dev | Device handle | |
| [in] | buf | Data to write to flash |
| [in] | page | Page to begin writing at |
| [in] | count | Number of pages to write |
| API_EXPORT int CALL_CONV bladerf_write_flash_bytes | ( | struct bladerf * | dev, |
| const uint8_t * | buf, | ||
| uint32_t | address, | ||
| uint32_t | length ) |
Write data to the bladeRF's SPI flash device
| dev | Device handle | |
| [in] | buf | Data to write to flash |
| [in] | address | Address to begin writing at |
| [in] | length | Number of bytes to write |
| API_EXPORT int CALL_CONV bladerf_write_otp | ( | struct bladerf * | dev, |
| uint8_t * | buf ) |
Write data to the bladeRF's SPI flash OTP device
| dev | Device handle | |
| [in] | buf | Data to write to OTP |