PDK API Guide for J721E
|
Functions | |
Board_flashHandle | Board_flashOpen (uint32_t deviceId, uint32_t portNum, void *params) |
Opens a flash device for use. More... | |
Board_flash_STATUS | Board_flashClose (Board_flashHandle handle) |
Closes the device. More... | |
Board_flash_STATUS | Board_flashRead (Board_flashHandle handle, uint32_t offset, uint8_t *buf, uint32_t len, void *params) |
Reads a page from the device. More... | |
Board_flash_STATUS | Board_flashWrite (Board_flashHandle handle, uint32_t offset, uint8_t *buf, uint32_t len, void *params) |
Write the data to the device. More... | |
Board_flash_STATUS | Board_flashBlkPageToOffset (Board_flashHandle handle, uint32_t *offset, uint32_t block, uint32_t page) |
Convert the block and page number to offset. More... | |
Board_flash_STATUS | Board_flashOffsetToBlkPage (Board_flashHandle handle, uint32_t offset, uint32_t *block, uint32_t *page) |
Convert the offset to block and page number. More... | |
Board_flash_STATUS | Board_flashOffsetToSectorPage (Board_flashHandle handle, uint32_t offset, uint32_t *sector, uint32_t *page, bool hybridSector_flag) |
Convert the offset to sector and page number. More... | |
Board_flash_STATUS | Board_flashEraseBlk (Board_flashHandle handle, uint32_t block_number) |
erase a block on the flash block More... | |
Board_flashHandle Board_flashOpen | ( | uint32_t | deviceId, |
uint32_t | portNum, | ||
void * | params | ||
) |
Opens a flash device for use.
[in] | deviceId | Flash device ID to open |
[in] | portNum | Peripheral port number attached to the flash device |
[in] | params | configuration parameters for the peripheral interface |
NULL | or Board_flashHandle. |
Board_flash_STATUS Board_flashClose | ( | Board_flashHandle | handle | ) |
Closes the device.
[in] | handle | Handle to the device as returned in the open call. |
BOARD_FLASH_EOK | on Success |
Board_flash_STATUS Board_flashRead | ( | Board_flashHandle | handle, |
uint32_t | offset, | ||
uint8_t * | buf, | ||
uint32_t | len, | ||
void * | params | ||
) |
Reads a page from the device.
[in] | handle | Flash device handle from the open |
[in] | offset | Offset to start the read from |
[in] | buf | Pointer to a buffer to read the data into |
[in] | len | Amount of data to read |
[in] | params | Pointer to read configuration parameters for QSPI NOR, *params is used to set the Board_flashQspiIoMode |
BOARD_FLASH_EOK | on Success |
Board_flash_STATUS Board_flashWrite | ( | Board_flashHandle | handle, |
uint32_t | offset, | ||
uint8_t * | buf, | ||
uint32_t | len, | ||
void * | params | ||
) |
Write the data to the device.
[in] | handle | Handle to the device as returned by open |
[in] | offset | Offset to start writing the data at. |
[in] | buf | Pointer to data to write |
[in] | len | Length of the data pointed to by buf |
[in] | params | Pointer to write configuration parameters for QSPI NOR, *params is used to set the Board_flashQspiIoMode |
BOARD_FLASH_EOK | on Success |
Board_flash_STATUS Board_flashBlkPageToOffset | ( | Board_flashHandle | handle, |
uint32_t * | offset, | ||
uint32_t | block, | ||
uint32_t | page | ||
) |
Convert the block and page number to offset.
[in] | handle | Handle to the device as returned by open |
[in] | offset | Offset to start writing the data at. |
[in] | block | Block number |
[in] | page | Page number |
BOARD_FLASH_EOK | on Success |
Board_flash_STATUS Board_flashOffsetToBlkPage | ( | Board_flashHandle | handle, |
uint32_t | offset, | ||
uint32_t * | block, | ||
uint32_t * | page | ||
) |
Convert the offset to block and page number.
[in] | handle | Handle to the device as returned by open |
[in] | offset | Offset to start writing the data at. |
[in] | block | Pointer to the block number |
[in] | page | Pointer to the Page number |
BOARD_FLASH_EOK | on Success |
Board_flash_STATUS Board_flashOffsetToSectorPage | ( | Board_flashHandle | handle, |
uint32_t | offset, | ||
uint32_t * | sector, | ||
uint32_t * | page, | ||
bool | hybridSector_flag | ||
) |
Convert the offset to sector and page number.
[in] | handle | Handle to the device as returned by open |
[in] | offset | Offset to start writing the data at. |
[in] | sector | Pointer to the sector number |
[in] | page | Pointer to the Page number |
[in] | hybridSector_flag | Flag to enable Hybrid Sector Erase |
BOARD_FLASH_EOK | on Success |
Board_flash_STATUS Board_flashEraseBlk | ( | Board_flashHandle | handle, |
uint32_t | block_number | ||
) |
erase a block on the flash block
[in] | handle | Flash device handle from the open |
[in] | block_number | Block ID to erase |
BOARD_FLASH_EOK | on Success |