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

General Description

Initialisation and other management functions for WHD system.

Functions

whd_result_t whd_init (whd_driver_t *whd_driver_ptr, whd_init_config_t *whd_init_config, whd_resource_source_t *resource_ops, whd_buffer_funcs_t *buffer_ops, whd_netif_funcs_t *network_ops)
 Initialize an instance of the WHD driver. More...
 
whd_result_t whd_wifi_on (whd_driver_t whd_driver, whd_interface_t *ifpp)
 Turn on the Wi-Fi device. More...
 
whd_result_t whd_wifi_off (whd_interface_t ifp)
 Turn off the Wi-Fi device. More...
 
whd_result_t whd_deinit (whd_interface_t ifp)
 Shutdown this instance of the wifi driver, freeing all used resources. More...
 
whd_result_t whd_wifi_set_up (whd_interface_t ifp)
 Brings up the Wi-Fi core. More...
 
whd_result_t whd_wifi_set_down (whd_interface_t ifp)
 Bring down the Wi-Fi core. More...
 
whd_result_t whd_add_secondary_interface (whd_driver_t whd_drv, whd_mac_t *mac_addr, whd_interface_t *ifpp)
 Creates a secondary interface. More...
 

Function Documentation

◆ whd_init()

whd_result_t whd_init ( whd_driver_t whd_driver_ptr,
whd_init_config_t whd_init_config,
whd_resource_source_t resource_ops,
whd_buffer_funcs_t buffer_ops,
whd_netif_funcs_t network_ops 
)

Initialize an instance of the WHD driver.

Parameters
whd_driver_ptrPointer to Pointer to handle instance of the driver
whd_init_configPointer to configuration data that controls how the driver is initialized
resource_opsPointer to resource interface to provide resources to the driver initialization process
buffer_opsPointer to a buffer interface to provide buffer related services to the driver instance
network_opsPointer to a whd_netif_funcs_t to provide network stack services to the driver instance
Returns
WHD_SUCCESS or Error code

◆ whd_wifi_on()

whd_result_t whd_wifi_on ( whd_driver_t  whd_driver,
whd_interface_t ifpp 
)

Turn on the Wi-Fi device.

Initialise Wi-Fi platform Program various WiFi parameters and modes

Parameters
whd_driverPointer to handle instance of the driver
ifppPointer to Pointer to handle instance of whd interface
Returns
WHD_SUCCESS if initialization is successful, error code otherwise

◆ whd_wifi_off()

whd_result_t whd_wifi_off ( whd_interface_t  ifp)

Turn off the Wi-Fi device.

  • De-Initialises the required parts of the hardware platform i.e. pins for SDIO/SPI, interrupt, reset, power etc.
  • De-Initialises the whd thread which arbitrates access to the SDIO/SPI bus
Parameters
ifpPointer to handle instance of whd interface
Returns
WHD_SUCCESS if deinitialization is successful, Error code otherwise

◆ whd_deinit()

whd_result_t whd_deinit ( whd_interface_t  ifp)

Shutdown this instance of the wifi driver, freeing all used resources.

Parameters
ifpPointer to handle instance of whd interface
Returns
WHD_SUCCESS or Error code

◆ whd_wifi_set_up()

whd_result_t whd_wifi_set_up ( whd_interface_t  ifp)

Brings up the Wi-Fi core.

Parameters
ifpPointer to handle instance of whd interface
Returns
WHD_SUCCESS or Error code

◆ whd_wifi_set_down()

whd_result_t whd_wifi_set_down ( whd_interface_t  ifp)

Bring down the Wi-Fi core.

WARNING / NOTE: This brings down the Wi-Fi core and existing network connections will be lost.

Parameters
ifpPointer to handle instance of whd interface
Returns
WHD_SUCCESS or Error code

◆ whd_add_secondary_interface()

whd_result_t whd_add_secondary_interface ( whd_driver_t  whd_drv,
whd_mac_t mac_addr,
whd_interface_t ifpp 
)

Creates a secondary interface.

Parameters
whd_drvPointer to handle instance of the driver
mac_addrMAC address for the interface
ifppPointer to the whd interface pointer
Returns
WHD_SUCCESS or Error code