Interface to a data source that provides external resources to the radio driver. More...
#include <whd_resource_api.h>
Data Fields | |
uint32_t(* | whd_resource_size )(whd_driver_t whd_drv, whd_resource_type_t resource, uint32_t *size_out) |
Gets the size of the resource for respective resource type. More... | |
uint32_t(* | whd_get_resource_block )(whd_driver_t whd_drv, whd_resource_type_t type, uint32_t blockno, const uint8_t **data, uint32_t *size_out) |
Gets the resource block for specified resource type. More... | |
uint32_t(* | whd_get_resource_no_of_blocks )(whd_driver_t whd_drv, whd_resource_type_t type, uint32_t *block_count) |
Gets block count for the specified resource_type. More... | |
uint32_t(* | whd_get_resource_block_size )(whd_driver_t whd_drv, whd_resource_type_t type, uint32_t *size_out) |
Gets block size for the specified resource_type. More... | |
Interface to a data source that provides external resources to the radio driver.
This data structure defines a source for data generally intended to be downloaded to the radio device.
The data is assumed to be available as a set of blocks that are all the same size with the exception of the last block. The whd_get_resource_block_size function returns this block size. The whd_get_resource_block call returns a pointer to a block of data. The actual storage for the data block is owned by the data source, so only a pointer to the block is returned. There are two predominate use cases. If the data is stored in the internal flash memory, then whd_get_resource_no_of_blocks will return 1 and a call to whd_get_resource_block will return a pointer to the data image with the size being the size of the data image. If the data is stored in an external flash of some type, each block of data can be read from the external flash one at a time. whd_get_resource_no_of_blocks will return the physical number of blocks in the data and each call to whd_get_resource_block will read data from the external memory and make it available via an internal buffer.
Definition at line 71 of file whd_resource_api.h.
uint32_t(* whd_get_resource_block) (whd_driver_t whd_drv, whd_resource_type_t type, uint32_t blockno, const uint8_t **data, uint32_t *size_out) |
Gets the resource block for specified resource type.
whd_drv | Pointer to handle instance of the driver |
type | Type of resource - WHD_RESOURCE_WLAN_FIRMWARE, WHD_RESOURCE_WLAN_NVRAM, WHD_RESOURCE_WLAN_CLM |
blockno | The number of block |
data | Pointer to a block of data |
size_out | Size of the resource |
Definition at line 96 of file whd_resource_api.h.
uint32_t(* whd_get_resource_block_size) (whd_driver_t whd_drv, whd_resource_type_t type, uint32_t *size_out) |
Gets block size for the specified resource_type.
whd_drv | Pointer to handle instance of the driver |
type | Type of resources - WHD_RESOURCE_WLAN_FIRMWARE, WHD_RESOURCE_WLAN_NVRAM, WHD_RESOURCE_WLAN_CLM |
size_out | Pointer to store size of the block |
Definition at line 119 of file whd_resource_api.h.
uint32_t(* whd_get_resource_no_of_blocks) (whd_driver_t whd_drv, whd_resource_type_t type, uint32_t *block_count) |
Gets block count for the specified resource_type.
whd_drv | Pointer to handle instance of the driver |
type | Type of resource - WHD_RESOURCE_WLAN_FIRMWARE, WHD_RESOURCE_WLAN_NVRAM, WHD_RESOURCE_WLAN_CLM |
block_count | Pointer to store block count for the resource |
Definition at line 108 of file whd_resource_api.h.
uint32_t(* whd_resource_size) (whd_driver_t whd_drv, whd_resource_type_t resource, uint32_t *size_out) |
Gets the size of the resource for respective resource type.
whd_drv | Pointer to handle instance of the driver |
resource | Type of resource - WHD_RESOURCE_WLAN_FIRMWARE, WHD_RESOURCE_WLAN_NVRAM, WHD_RESOURCE_WLAN_CLM |
size_out | Size of the resource |
Definition at line 83 of file whd_resource_api.h.