WHD Wi-Fi Management API

group wifimanagement

Initialisation and other management functions for WHD system.

Functions

uint32_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.

Return

WHD_SUCCESS or Error code

Parameters
  • whd_driver_ptr: Pointer to Pointer to handle instance of the driver

  • whd_init_config: Pointer to configuration data that controls how the driver is initialized

  • resource_ops: Pointer to resource interface to provide resources to the driver initialization process

  • buffer_ops: Pointer to a buffer interface to provide buffer related services to the driver instance

  • network_ops: Pointer to a whd_netif_funcs_t to provide network stack services to the driver instance

uint32_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

Return

WHD_SUCCESS if initialization is successful, error code otherwise

Parameters
  • whd_driver: Pointer to handle instance of the driver

  • ifpp: Pointer to Pointer to handle instance of whd interface

uint32_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

Return

WHD_SUCCESS if deinitialization is successful, Error code otherwise

Parameters
  • ifp: Pointer to handle instance of whd interface

uint32_t whd_deinit(whd_interface_t ifp)

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

Return

WHD_SUCCESS or Error code

Parameters
  • ifp: Pointer to handle instance of whd interface

uint32_t whd_wifi_set_up(whd_interface_t ifp)

Brings up the Wi-Fi core.

Return

WHD_SUCCESS or Error code

Parameters
  • ifp: Pointer to handle instance of whd interface

uint32_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.

Return

WHD_SUCCESS or Error code

Parameters
  • ifp: Pointer to handle instance of whd interface

uint32_t whd_add_secondary_interface(whd_driver_t whd_drv, whd_mac_t *mac_addr, whd_interface_t *ifpp)

Creates a secondary interface.

Return

WHD_SUCCESS or Error code

Parameters
  • whd_drv: Pointer to handle instance of the driver

  • mac_addr: MAC address for the interface

  • ifpp: Pointer to the whd interface pointer