Skip to content

Commit 66cf10f

Browse files
cy-opmKyle Kearney
authored andcommitted
Update WHD to 1.30.0
1 parent b005bf2 commit 66cf10f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+39685
-35118
lines changed

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_WHD/generated_mac_address.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
* MAC address is printed during WHD power up
77
*/
88

9-
#define NVRAM_GENERATED_MAC_ADDRESS "macaddr=00:A0:50:45:2e:c8"
9+
#define NVRAM_GENERATED_MAC_ADDRESS "macaddr=00:A0:50:8c:3c:1b"

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_WHD/inc/whd_bus_types.h

Lines changed: 0 additions & 98 deletions
This file was deleted.

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_WHD/inc/whd_resource_api.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,15 @@ struct whd_resource_source
8686
*
8787
* @param whd_drv Pointer to handle instance of the driver
8888
* @param type Type of resource - WHD_RESOURCE_WLAN_FIRMWARE, WHD_RESOURCE_WLAN_NVRAM, WHD_RESOURCE_WLAN_CLM
89+
* @param blockno The number of block
8990
* @param data Pointer to a block of data
9091
* @param size_out Size of the resource
9192
*
9293
* @return WHD_SUCCESS or error code
9394
*
9495
*/
95-
uint32_t (*whd_get_resource_block)(whd_driver_t whd_drv, whd_resource_type_t type, const uint8_t **data,
96-
uint32_t *size_out);
96+
uint32_t (*whd_get_resource_block)(whd_driver_t whd_drv, whd_resource_type_t type,
97+
uint32_t blockno, const uint8_t **data, uint32_t *size_out);
9798

9899
/** Gets block count for the specified resource_type
99100
*

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_WHD/inc/whd_types.h

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
#include <stdint.h>
2424
#include "cy_result.h"
25+
#include "cyhal_hw_types.h"
2526

2627
#ifndef INCLUDED_WHD_TYPES_H_
2728
#define INCLUDED_WHD_TYPES_H_
@@ -943,30 +944,25 @@ typedef struct
943944
} whd_wep_key_t;
944945

945946
/**
946-
* Variant data type.
947+
* Structure for Out-of-band interrupt config parameters which can be set by application during whd power up
947948
*/
948-
typedef union whd_variant
949+
typedef struct whd_oob_config
949950
{
950-
void *pvval; /**< Void pointer */
951-
uint32_t u32val; /**< uint32_t type variable */
952-
} whd_variant_t;
953-
954-
/**
955-
* SDIO bus will use the host-wake out-of-band (OOB) signal.
956-
* @ref whd_get_intr_config_func_t must be specified when this flag is set.
957-
*/
958-
#define WHD_BUS_SDIO_OOB_INTR (1UL << 0)
951+
cyhal_gpio_t host_oob_pin; /**< Host-side GPIO pin selection */
952+
uint8_t dev_gpio_sel; /**< WiFi device-side GPIO pin selection (must be zero) */
953+
whd_bool_t is_falling_edge; /**< Interrupt trigger (polarity) */
954+
uint8_t intr_priority; /**< OOB interrupt priority */
955+
} whd_oob_config_t;
959956

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

972968
/**
@@ -976,7 +972,7 @@ typedef struct whd_spi_config
976972
{
977973
/* Bus config */
978974
whd_bool_t is_spi_normal_mode; /**< Default is false */
979-
whd_variant_t oob_intr; /**< Caller provided opaque data */
975+
whd_oob_config_t oob_config; /**< Out-of-band interrupt configuration */
980976
} whd_spi_config_t;
981977

982978
/**
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
#define WHD_VERSION "1b9fceb7"
1+
#define WHD_VERSION "v1.30.0-rc1-4-g9bd856ef-dirty"
22
#define WHD_BRANCH "master"
3-
#define WHD_DATE "2019-07-03 16:07:52 +0530"
3+
#define WHD_DATE "2019-08-23 15:56:34 +0800"

targets/TARGET_Cypress/TARGET_PSOC6/TARGET_WHD/inc/whd_wifi_api.h

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -76,43 +76,33 @@ extern uint32_t whd_init(whd_driver_t *whd_driver_ptr, whd_init_config_t *whd_in
7676
* @param whd_driver Pointer to handle instance of the driver
7777
* @param whd_config Configuration for SDIO bus
7878
* @param sdio_obj The SDHC hardware interface, from the Level 3 CY HW APIs
79-
* @param sdio_ops Pointer to a whd_sdio_funcs_t to provide SDIO services to the driver instance
8079
*
8180
* @return WHD_SUCCESS or Error code
8281
*/
83-
extern uint32_t whd_bus_sdio_attach(whd_driver_t whd_driver, whd_sdio_config_t *whd_config, void *sdio_obj,
84-
whd_sdio_funcs_t *sdio_ops);
82+
extern uint32_t whd_bus_sdio_attach(whd_driver_t whd_driver, whd_sdio_config_t *whd_config, cyhal_sdio_t *sdio_obj);
8583

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

9590
/** Attach the WLAN Device to a specific SPI bus
9691
*
9792
* @param whd_driver Pointer to handle instance of the driver
9893
* @param whd_config Configuration for SPI bus
9994
* @param spi_obj The SPI hardware interface, from the Level 3 CY HW APIs
100-
* @param spi_ops Pointer to a whd_spi_funcs_t to provide SPI services to the driver instance
10195
*
10296
* @return WHD_SUCCESS or Error code
10397
*/
104-
extern uint32_t whd_bus_spi_attach(whd_driver_t whd_driver, whd_spi_config_t *whd_config, void *spi_obj,
105-
whd_spi_funcs_t *spi_ops);
98+
extern uint32_t whd_bus_spi_attach(whd_driver_t whd_driver, whd_spi_config_t *whd_config, cyhal_spi_t *spi_obj);
10699

107-
/**
108-
* Notify the WLAN device that the SPI interrupt signal asserted.
100+
/** Detach the WLAN Device to a specific SPI bus
109101
*
110-
* This function may be called after the WHD calls @ref whd_enable_intr_func_t with enable
111-
* set to WHD_TRUE.
112-
*
113-
* @param whd_driver Pointer to the handle instance of the driver associated to the event
102+
* @param whd_driver Pointer to handle instance of the driver
114103
*/
115-
extern void whd_bus_spi_oob_intr_asserted(whd_driver_t whd_driver);
104+
extern void whd_bus_spi_detach(whd_driver_t whd_driver);
105+
116106
/* @} */
117107

118108
/** @addtogroup wifi WHD Wi-Fi API
@@ -263,7 +253,7 @@ extern uint32_t whd_wifi_scan(whd_interface_t ifp,
263253
const uint16_t *optional_channel_list,
264254
const whd_scan_extended_params_t *optional_extended_params,
265255
whd_scan_result_callback_t callback,
266-
whd_scan_result_t **result_ptr,
256+
whd_scan_result_t *result_ptr,
267257
void *user_data);
268258

269259
/** Abort a previously issued scan

0 commit comments

Comments
 (0)