Skip to content

Update WHD to 1.30.0 #11319

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ struct whd_scan_userdata {

static whd_scan_userdata interal_scan_data;
static whd_scan_result_t internal_scan_result;
static whd_scan_result_t *result_ptr = &internal_scan_result;

extern "C" void whd_emac_wifi_link_state_changed(bool state_up, whd_interface_t ifp);

Expand Down Expand Up @@ -397,7 +396,7 @@ int WhdSTAInterface::scan(WiFiAccessPoint *aps, unsigned count)


whd_res = (whd_result_t)whd_wifi_scan(_whd_emac.ifp, WHD_SCAN_TYPE_ACTIVE, WHD_BSS_TYPE_ANY,
NULL, NULL, NULL, NULL, whd_scan_handler, (whd_scan_result_t **) &result_ptr, &interal_scan_data);
NULL, NULL, NULL, NULL, whd_scan_handler, &internal_scan_result, &interal_scan_data);
if (whd_res != WHD_SUCCESS) {
res = whd_toerror(whd_res);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
* MAC address is printed during WHD power up
*/

#define NVRAM_GENERATED_MAC_ADDRESS "macaddr=00:A0:50:45:2e:c8"
#define NVRAM_GENERATED_MAC_ADDRESS "macaddr=00:A0:50:d4:32:81"
98 changes: 0 additions & 98 deletions targets/TARGET_Cypress/TARGET_PSOC6/TARGET_WHD/inc/whd_bus_types.h

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,15 @@ struct whd_resource_source
*
* @param whd_drv Pointer to handle instance of the driver
* @param type Type of resource - WHD_RESOURCE_WLAN_FIRMWARE, WHD_RESOURCE_WLAN_NVRAM, WHD_RESOURCE_WLAN_CLM
* @param blockno The number of block
* @param data Pointer to a block of data
* @param size_out Size of the resource
*
* @return WHD_SUCCESS or error code
*
*/
uint32_t (*whd_get_resource_block)(whd_driver_t whd_drv, whd_resource_type_t type, const uint8_t **data,
uint32_t *size_out);
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 block count for the specified resource_type
*
Expand Down
24 changes: 10 additions & 14 deletions targets/TARGET_Cypress/TARGET_PSOC6/TARGET_WHD/inc/whd_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#include <stdint.h>
#include "cy_result.h"
#include "cyhal_hw_types.h"

#ifndef INCLUDED_WHD_TYPES_H_
#define INCLUDED_WHD_TYPES_H_
Expand Down Expand Up @@ -943,30 +944,25 @@ typedef struct
} whd_wep_key_t;

/**
* Variant data type.
* Structure for Out-of-band interrupt config parameters which can be set by application during whd power up
*/
typedef union whd_variant
typedef struct whd_oob_config
{
void *pvval; /**< Void pointer */
uint32_t u32val; /**< uint32_t type variable */
} whd_variant_t;

/**
* SDIO bus will use the host-wake out-of-band (OOB) signal.
* @ref whd_get_intr_config_func_t must be specified when this flag is set.
*/
#define WHD_BUS_SDIO_OOB_INTR (1UL << 0)
cyhal_gpio_t host_oob_pin; /**< Host-side GPIO pin selection */
uint8_t dev_gpio_sel; /**< WiFi device-side GPIO pin selection (must be zero) */
whd_bool_t is_falling_edge; /**< Interrupt trigger (polarity) */
uint8_t intr_priority; /**< OOB interrupt priority */
} whd_oob_config_t;

/**
* Structure for SDIO config parameters which can be set by application during whd power up
*/
typedef struct whd_sdio_config
{
uint32_t flags; /**< Configuration flags (see WHD_BUS_SDIO_XXX constants). */
/* Bus config */
whd_bool_t sdio_1bit_mode; /**< Default is false, means SDIO operates under 4 bit mode */
whd_bool_t high_speed_sdio_clock; /**< Default is false, means SDIO operates in normal clock rate */
whd_variant_t oob_intr; /**< Caller provided opaque data (@ref WHD_BUS_SDIO_OOB_INTR) */
whd_oob_config_t oob_config; /**< Out-of-band interrupt configuration (required when bus can sleep) */
} whd_sdio_config_t;

/**
Expand All @@ -976,7 +972,7 @@ typedef struct whd_spi_config
{
/* Bus config */
whd_bool_t is_spi_normal_mode; /**< Default is false */
whd_variant_t oob_intr; /**< Caller provided opaque data */
whd_oob_config_t oob_config; /**< Out-of-band interrupt configuration */
} whd_spi_config_t;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#define WHD_VERSION "1b9fceb7"
#define WHD_BRANCH "master"
#define WHD_DATE "2019-07-03 16:07:52 +0530"
#define WHD_VERSION "v1.30.0-rc3-dirty"
#define WHD_BRANCH "v1.30.0-rc3"
#define WHD_DATE "2019-08-27 16:29:32 +0800"
30 changes: 10 additions & 20 deletions targets/TARGET_Cypress/TARGET_PSOC6/TARGET_WHD/inc/whd_wifi_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,43 +76,33 @@ extern uint32_t whd_init(whd_driver_t *whd_driver_ptr, whd_init_config_t *whd_in
* @param whd_driver Pointer to handle instance of the driver
* @param whd_config Configuration for SDIO bus
* @param sdio_obj The SDHC hardware interface, from the Level 3 CY HW APIs
* @param sdio_ops Pointer to a whd_sdio_funcs_t to provide SDIO services to the driver instance
*
* @return WHD_SUCCESS or Error code
*/
extern uint32_t whd_bus_sdio_attach(whd_driver_t whd_driver, whd_sdio_config_t *whd_config, void *sdio_obj,
whd_sdio_funcs_t *sdio_ops);
extern uint32_t whd_bus_sdio_attach(whd_driver_t whd_driver, whd_sdio_config_t *whd_config, cyhal_sdio_t *sdio_obj);

/** Notify the WLAN device that the SDIO host-wake signal asserted.
/** Detach the WLAN Device to a specific SDIO bus
*
* This function may be called after the WHD calls @ref whd_enable_intr_func_t with enable
* set to WHD_TRUE.
*
* @param whd_driver Pointer to handle instance of the driver
* @param whd_driver Pointer to handle instance of the driver
*/
extern void whd_bus_sdio_oob_intr_asserted(whd_driver_t whd_driver);
extern void whd_bus_sdio_detach(whd_driver_t whd_driver);

/** Attach the WLAN Device to a specific SPI bus
*
* @param whd_driver Pointer to handle instance of the driver
* @param whd_config Configuration for SPI bus
* @param spi_obj The SPI hardware interface, from the Level 3 CY HW APIs
* @param spi_ops Pointer to a whd_spi_funcs_t to provide SPI services to the driver instance
*
* @return WHD_SUCCESS or Error code
*/
extern uint32_t whd_bus_spi_attach(whd_driver_t whd_driver, whd_spi_config_t *whd_config, void *spi_obj,
whd_spi_funcs_t *spi_ops);
extern uint32_t whd_bus_spi_attach(whd_driver_t whd_driver, whd_spi_config_t *whd_config, cyhal_spi_t *spi_obj);

/**
* Notify the WLAN device that the SPI interrupt signal asserted.
/** Detach the WLAN Device to a specific SPI bus
*
* This function may be called after the WHD calls @ref whd_enable_intr_func_t with enable
* set to WHD_TRUE.
*
* @param whd_driver Pointer to the handle instance of the driver associated to the event
* @param whd_driver Pointer to handle instance of the driver
*/
extern void whd_bus_spi_oob_intr_asserted(whd_driver_t whd_driver);
extern void whd_bus_spi_detach(whd_driver_t whd_driver);

/* @} */

/** @addtogroup wifi WHD Wi-Fi API
Expand Down Expand Up @@ -263,7 +253,7 @@ extern uint32_t whd_wifi_scan(whd_interface_t ifp,
const uint16_t *optional_channel_list,
const whd_scan_extended_params_t *optional_extended_params,
whd_scan_result_callback_t callback,
whd_scan_result_t **result_ptr,
whd_scan_result_t *result_ptr,
void *user_data);

/** Abort a previously issued scan
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading