Infineon Logo Wi-Fi Host Driver (WHD) Public API Reference Guide
 
whd_resource_source Struct Reference

General Description

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.

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...
 
uint32_t(* whd_resource_read )(whd_driver_t whd_drv, whd_resource_type_t type, uint32_t offset, uint32_t size, uint32_t *size_out, void *buffer)
 Gets the resource for specified resource type. More...
 

Field Documentation

◆ whd_resource_size

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.

Parameters
whd_drvPointer to handle instance of the driver
resourceType of resource - WHD_RESOURCE_WLAN_FIRMWARE, WHD_RESOURCE_WLAN_NVRAM, WHD_RESOURCE_WLAN_CLM
size_outSize of the resource
Returns
WHD_SUCCESS or error code

◆ whd_get_resource_block

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.

Parameters
whd_drvPointer to handle instance of the driver
typeType of resource - WHD_RESOURCE_WLAN_FIRMWARE, WHD_RESOURCE_WLAN_NVRAM, WHD_RESOURCE_WLAN_CLM
blocknoThe number of block
dataPointer to a block of data
size_outSize of the resource
Returns
WHD_SUCCESS or error code

◆ whd_get_resource_no_of_blocks

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.

Parameters
whd_drvPointer to handle instance of the driver
typeType of resource - WHD_RESOURCE_WLAN_FIRMWARE, WHD_RESOURCE_WLAN_NVRAM, WHD_RESOURCE_WLAN_CLM
block_countPointer to store block count for the resource
Returns
WHD_SUCCESS or error code

◆ whd_get_resource_block_size

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.

Parameters
whd_drvPointer to handle instance of the driver
typeType of resources - WHD_RESOURCE_WLAN_FIRMWARE, WHD_RESOURCE_WLAN_NVRAM, WHD_RESOURCE_WLAN_CLM
size_outPointer to store size of the block
Returns
WHD_SUCCESS or error code

◆ whd_resource_read

uint32_t(* whd_resource_read) (whd_driver_t whd_drv, whd_resource_type_t type, uint32_t offset, uint32_t size, uint32_t *size_out, void *buffer)

Gets the resource for specified resource type.

Parameters
whd_drvPointer to handle instance of the driver
typeType of resource - WHD_RESOURCE_WLAN_FIRMWARE, WHD_RESOURCE_WLAN_NVRAM, WHD_RESOURCE_WLAN_CLM
offsetoffset address to store buffer
sizePointer to a size of buffer
size_outPointer to store size of buffer
bufferPointer to a buffer
Returns
WHD_SUCCESS or error code

The documentation for this struct was generated from the following file: