Skip to content

Update IDF to 90747cc8b #3118

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 1 commit into from
Aug 20, 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
Binary file modified tools/sdk/bin/bootloader_dio_40m.bin
Binary file not shown.
Binary file modified tools/sdk/bin/bootloader_dio_80m.bin
Binary file not shown.
Binary file modified tools/sdk/bin/bootloader_dout_40m.bin
Binary file not shown.
Binary file modified tools/sdk/bin/bootloader_dout_80m.bin
Binary file not shown.
Binary file modified tools/sdk/bin/bootloader_qio_40m.bin
Binary file not shown.
Binary file modified tools/sdk/bin/bootloader_qio_80m.bin
Binary file not shown.
Binary file modified tools/sdk/bin/bootloader_qout_40m.bin
Binary file not shown.
Binary file modified tools/sdk/bin/bootloader_qout_80m.bin
Binary file not shown.
8 changes: 8 additions & 0 deletions tools/sdk/include/bootloader_support/bootloader_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,11 @@ esp_err_t bootloader_common_get_sha256_of_partition(uint32_t address, uint32_t s
* @brief Configure VDDSDIO, call this API to rise VDDSDIO to 1.9V when VDDSDIO regulator is enabled as 1.8V mode.
*/
void bootloader_common_vddsdio_configure();

/**
* @brief Set the flash CS setup and hold time.
*
* CS setup time is recomemded to be 1.5T, and CS hold time is recommended to be 2.5T.
* cs_setup = 1, cs_setup_time = 0; cs_hold = 1, cs_hold_time = 1
*/
void bootloader_common_set_flash_cs_timing();
1 change: 1 addition & 0 deletions tools/sdk/include/esp32/esp_event_legacy.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ typedef enum {
SYSTEM_EVENT_STA_WPS_ER_FAILED, /**< ESP32 station wps fails in enrollee mode */
SYSTEM_EVENT_STA_WPS_ER_TIMEOUT, /**< ESP32 station wps timeout in enrollee mode */
SYSTEM_EVENT_STA_WPS_ER_PIN, /**< ESP32 station wps pin code in enrollee mode */
SYSTEM_EVENT_STA_WPS_ER_PBC_OVERLAP, /*!< ESP32 station wps overlap in enrollee mode */
SYSTEM_EVENT_AP_START, /**< ESP32 soft-AP start */
SYSTEM_EVENT_AP_STOP, /**< ESP32 soft-AP stop */
SYSTEM_EVENT_AP_STACONNECTED, /**< a station connected to ESP32 soft-AP */
Expand Down
24 changes: 24 additions & 0 deletions tools/sdk/include/esp32/esp_private/esp_wifi_private.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Copyright 2015-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef _ESP_WIFI_PRIVATE_H
#define _ESP_WIFI_PRIVATE_H

#include "freertos/FreeRTOS.h"
#include "freertos/queue.h"
#include "rom/queue.h"
#include "sdkconfig.h"
#include "esp_wifi_crypto_types.h"
#include "esp_wifi_os_adapter.h"

#endif /* _ESP_WIFI_PRIVATE_H */
21 changes: 21 additions & 0 deletions tools/sdk/include/esp32/esp_private/esp_wifi_types_private.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright 2015-2019 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at

// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef _ESP_WIFI_TYPES_PRIVATE_H
#define _ESP_WIFI_TYPES_PRIVATE_H

#include "rom/queue.h"
#include "esp_interface.h"

#endif
94 changes: 21 additions & 73 deletions tools/sdk/include/esp32/esp_wifi.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,10 @@

#include <stdint.h>
#include <stdbool.h>
#include "freertos/FreeRTOS.h"
#include "freertos/queue.h"
#include "rom/queue.h"
#include "sdkconfig.h"
#include "esp_err.h"
#include "esp_wifi_types.h"
#include "esp_wifi_crypto_types.h"
#include "esp_event.h"
#include "esp_wifi_os_adapter.h"
#include "esp_private/esp_wifi_private.h"

#ifdef __cplusplus
extern "C" {
Expand All @@ -89,6 +84,10 @@ extern "C" {
#define ESP_ERR_WIFI_WOULD_BLOCK (ESP_ERR_WIFI_BASE + 14) /*!< The caller would block */
#define ESP_ERR_WIFI_NOT_CONNECT (ESP_ERR_WIFI_BASE + 15) /*!< Station still in disconnect status */

#define ESP_ERR_WIFI_POST (ESP_ERR_WIFI_BASE + 18) /*!< Failed to post the event to WiFi task */
#define ESP_ERR_WIFI_INIT_STATE (ESP_ERR_WIFI_BASE + 19) /*!< Invalod WiFi state when init/deinit is called */
#define ESP_ERR_WIFI_STOP_STATE (ESP_ERR_WIFI_BASE + 20) /*!< Returned when WiFi is stopping */

/**
* @brief WiFi stack configuration parameters passed to esp_wifi_init call.
*/
Expand Down Expand Up @@ -581,7 +580,7 @@ esp_err_t esp_wifi_get_channel(uint8_t *primary, wifi_second_chan_t *second);
* and the country info of the AP to which the station is connected is {.cc="JP", .schan=1, .nchan=14}
* then the country info that will be used is {.cc="JP", .schan=1, .nchan=14}. If the station disconnected
* from the AP the country info is set back back to the country info of the station automatically,
* {.cc="USA", .schan=1, .nchan=11} in the example.
* {.cc="US", .schan=1, .nchan=11} in the example.
* @attention 3. When the country policy is WIFI_COUNTRY_POLICY_MANUAL, always use the configured country info.
* @attention 4. When the country info is changed because of configuration or because the station connects to a different
* external AP, the country IE in probe response/beacon of the soft-AP is changed also.
Expand Down Expand Up @@ -840,6 +839,16 @@ esp_err_t esp_wifi_set_auto_connect(bool en) __attribute__ ((deprecated));
*/
esp_err_t esp_wifi_get_auto_connect(bool *en) __attribute__ ((deprecated));

/**
* @brief Function signature for received Vendor-Specific Information Element callback.
* @param ctx Context argument, as passed to esp_wifi_set_vendor_ie_cb() when registering callback.
* @param type Information element type, based on frame type received.
* @param sa Source 802.11 address.
* @param vnd_ie Pointer to the vendor specific element data received.
* @param rssi Received signal strength indication.
*/
typedef void (*esp_vendor_ie_cb_t) (void *ctx, wifi_vendor_ie_type_t type, const uint8_t sa[6], const vendor_ie_data_t *vnd_ie, int rssi);

/**
* @brief Set 802.11 Vendor-Specific Information Element
*
Expand All @@ -858,16 +867,6 @@ esp_err_t esp_wifi_get_auto_connect(bool *en) __attribute__ ((deprecated));
*/
esp_err_t esp_wifi_set_vendor_ie(bool enable, wifi_vendor_ie_type_t type, wifi_vendor_ie_id_t idx, const void *vnd_ie);

/**
* @brief Function signature for received Vendor-Specific Information Element callback.
* @param ctx Context argument, as passed to esp_wifi_set_vendor_ie_cb() when registering callback.
* @param type Information element type, based on frame type received.
* @param sa Source 802.11 address.
* @param vnd_ie Pointer to the vendor specific element data received.
* @param rssi Received signal strength indication.
*/
typedef void (*esp_vendor_ie_cb_t) (void *ctx, wifi_vendor_ie_type_t type, const uint8_t sa[6], const vendor_ie_data_t *vnd_ie, int rssi);

/**
* @brief Register Vendor-Specific Information Element monitoring callback.
*
Expand All @@ -881,60 +880,22 @@ typedef void (*esp_vendor_ie_cb_t) (void *ctx, wifi_vendor_ie_type_t type, const
esp_err_t esp_wifi_set_vendor_ie_cb(esp_vendor_ie_cb_t cb, void *ctx);

/**
* @brief Set maximum WiFi transmiting power
*
* @attention WiFi transmiting power is divided to six levels in phy init data.
* Level0 represents highest transmiting power and level5 represents lowest
* transmiting power. Packets of different rates are transmitted in
* different powers according to the configuration in phy init data.
* This API only sets maximum WiFi transmiting power. If this API is called,
* the transmiting power of every packet will be less than or equal to the
* value set by this API. If this API is not called, the value of maximum
* transmitting power set in phy_init_data.bin or menuconfig (depend on
* whether to use phy init data in partition or not) will be used. Default
* value is level0. Values passed in power are mapped to transmit power
* levels as follows:
* - [78, 127]: level0
* - [76, 77]: level1
* - [74, 75]: level2
* - [68, 73]: level3
* - [60, 67]: level4
* - [52, 59]: level5
* - [44, 51]: level5 - 2dBm
* - [34, 43]: level5 - 4.5dBm
* - [28, 33]: level5 - 6dBm
* - [20, 27]: level5 - 8dBm
* - [8, 19]: level5 - 11dBm
* - [-128, 7]: level5 - 14dBm
*
* @param power Maximum WiFi transmiting power.
* @brief Set maximum WiFi transmitting power
*
* @param power Maximum WiFi transmitting power, unit is 0.25dBm, range is [40, 82] corresponding to 10dBm - 20.5dBm here.
*
* @return
* - ESP_OK: succeed
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
* - ESP_ERR_WIFI_NOT_START: WiFi is not started by esp_wifi_start
* - ESP_ERR_WIFI_NOT_ARG: invalid argument
*/
esp_err_t esp_wifi_set_max_tx_power(int8_t power);

/**
* @brief Get maximum WiFi transmiting power
*
* @attention This API gets maximum WiFi transmiting power. Values got
* from power are mapped to transmit power levels as follows:
* - 78: 19.5dBm
* - 76: 19dBm
* - 74: 18.5dBm
* - 68: 17dBm
* - 60: 15dBm
* - 52: 13dBm
* - 44: 11dBm
* - 34: 8.5dBm
* - 28: 7dBm
* - 20: 5dBm
* - 8: 2dBm
* - -4: -1dBm
*
* @param power Maximum WiFi transmiting power.
* @param power Maximum WiFi transmitting power, unit is 0.25dBm.
*
* @return
* - ESP_OK: succeed
Expand Down Expand Up @@ -1102,19 +1063,6 @@ esp_err_t esp_wifi_set_ant(const wifi_ant_config_t *config);
*/
esp_err_t esp_wifi_get_ant(wifi_ant_config_t *config);

/**
* @brief A general API to set/get WiFi internal configuration, it's for debug only
*
* @param cmd : ioctl command type
* @param cfg : configuration for the command
*
* @return
* - ESP_OK: succeed
* - others: failed
*/
esp_err_t esp_wifi_internal_ioctl(int cmd, wifi_ioctl_config_t *cfg);


#ifdef __cplusplus
}
#endif
Expand Down
31 changes: 27 additions & 4 deletions tools/sdk/include/esp32/esp_wifi_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,26 @@ esp_err_t esp_wifi_internal_osi_funcs_md5_check(const char *md5);
esp_err_t esp_wifi_internal_crypto_funcs_md5_check(const char *md5);

/**
* @brief Check the git commit id of WiFi library
* @brief Check the MD5 values of the esp_wifi_types.h in IDF and WiFi library
*
* @attention 1. It is used for internal CI WiFi library check
* @attention 1. It is used for internal CI version check
*
* @return
* - ESP_OK : succeed
* - ESP_WIFI_INVALID_ARG : MD5 check fail
*/
esp_err_t esp_wifi_internal_wifi_type_md5_check(const char *md5);

/**
* @brief Check the MD5 values of the esp_wifi.h in IDF and WiFi library
*
* @attention 1. It is used for internal CI version check
*
* @return
* - ESP_OK : succeed
* - ESP_FAIL : fail
* - ESP_WIFI_INVALID_ARG : MD5 check fail
*/
esp_err_t esp_wifi_internal_git_commit_id_check(void);
esp_err_t esp_wifi_internal_esp_wifi_md5_check(const char *md5);

/**
* @brief Allocate a chunk of memory for WiFi driver
Expand Down Expand Up @@ -233,6 +244,18 @@ typedef esp_err_t (* wifi_mac_time_update_cb_t)( uint32_t time_delta );
*/
esp_err_t esp_wifi_internal_update_mac_time( uint32_t time_delta );

/**
* @brief A general API to set/get WiFi internal configuration, it's for debug only
*
* @param cmd : ioctl command type
* @param cfg : configuration for the command
*
* @return
* - ESP_OK: succeed
* - others: failed
*/
esp_err_t esp_wifi_internal_ioctl(int cmd, wifi_ioctl_config_t *cfg);

#ifdef __cplusplus
}
#endif
Expand Down
5 changes: 2 additions & 3 deletions tools/sdk/include/esp32/esp_wifi_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@

#include <stdint.h>
#include <stdbool.h>
#include "rom/queue.h"
#include "esp_err.h"
#include "esp_interface.h"
#include "esp_private/esp_wifi_types_private.h"

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -49,7 +48,7 @@ typedef struct {
char cc[3]; /**< country code string */
uint8_t schan; /**< start channel */
uint8_t nchan; /**< total channel number */
int8_t max_tx_power; /**< maximum tx power */
int8_t max_tx_power; /**< This field is used for getting WiFi maximum transmitting power, call esp_wifi_set_max_tx_power to set the maximum transmitting power. */
wifi_country_policy_t policy; /**< country policy */
} wifi_country_t;

Expand Down
6 changes: 1 addition & 5 deletions tools/sdk/include/esp32/hwcrypto/aes.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,13 @@ extern "C" {
/**
* \brief AES context structure
*
* \note buf is able to hold 32 extra bytes, which can be used:
* - for alignment purposes if VIA padlock is used, and/or
* - to simplify key expansion in the 256-bit case by
* generating an extra round key
*/
typedef struct {
uint8_t key_bytes;
volatile uint8_t key_in_hardware; /* This variable is used for fault injection checks, so marked volatile to avoid optimisation */
uint8_t key[32];
} esp_aes_context;


/**
* \brief The AES XTS context-type definition.
*/
Expand Down
16 changes: 0 additions & 16 deletions tools/sdk/include/lwip/lwip/mem.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,22 +55,6 @@ typedef size_t mem_size_t;
typedef u16_t mem_size_t;
#define MEM_SIZE_F U16_F

#if ESP_LWIP
/**
* lwip_malloc: if CONFIG_ALLOC_MEMORY_IN_SPIRAM_FIRST is enabled, Try to
* allocate memory for lwip in SPIRAM firstly. If failed, try to allocate
* internal memory then.
*/
#if CONFIG_WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST
#ifndef mem_malloc
#define mem_malloc(size) heap_caps_malloc_prefer(size, 2, MALLOC_CAP_DEFAULT|MALLOC_CAP_SPIRAM, MALLOC_CAP_DEFAULT|MALLOC_CAP_INTERNAL)
#endif
#ifndef mem_calloc
#define mem_calloc(n, size) heap_caps_calloc_prefer(n, size, 2, MALLOC_CAP_DEFAULT|MALLOC_CAP_SPIRAM, MALLOC_CAP_DEFAULT|MALLOC_CAP_INTERNAL)
#endif
#endif
#endif

#else

/* MEM_SIZE would have to be aligned, but using 64000 here instead of
Expand Down
Loading