IDF master b86fe0c66c

This commit is contained in:
me-no-dev
2021-10-13 18:21:12 +00:00
parent 2fb2ef54ce
commit 34c81be93b
538 changed files with 17119 additions and 4346 deletions

View File

@ -1,16 +1,8 @@
// Copyright 2015-2018 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.
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef __ESP_COEXIST_H__
#define __ESP_COEXIST_H__
@ -32,6 +24,13 @@ typedef enum {
ESP_COEX_PREFER_NUM, /*!< Prefer value numbers */
} esp_coex_prefer_t;
typedef enum {
EXTERN_COEX_WIRE_1 = 0,
EXTERN_COEX_WIRE_2,
EXTERN_COEX_WIRE_3,
EXTERN_COEX_WIRE_NUM,
} external_coex_wire_t;
/**
* @brief coex status type
*/
@ -41,6 +40,36 @@ typedef enum {
ESP_COEX_ST_TYPE_BT,
} esp_coex_status_type_t;
/**
* @brief external coex gpio pti
*/
typedef struct {
int32_t in_pin0;
int32_t in_pin1;
int32_t out_pin0;
} esp_external_coex_gpio_set_t;
/**
* @brief external coex pti level
*/
typedef enum {
EXTERN_COEX_PTI_MID = 0,
EXTERN_COEX_PTI_HIGH,
EXTERN_COEX_PTI_NUM,
} esp_coex_pti_level_t;
/**
* @brief external coex pti
*/
typedef struct {
uint32_t in_pti1;
uint32_t in_pti2;
uint32_t in_pti3;
uint32_t out_pti1;
uint32_t out_pti2;
uint32_t out_pti3;
} esp_external_coex_pti_set_t;
#define ESP_COEX_BLE_ST_MESH_CONFIG 0x08
#define ESP_COEX_BLE_ST_MESH_TRAFFIC 0x10
#define ESP_COEX_BLE_ST_MESH_STANDBY 0x20
@ -84,6 +113,18 @@ esp_err_t esp_coex_status_bit_set(esp_coex_status_type_t type, uint32_t status);
*/
esp_err_t esp_coex_status_bit_clear(esp_coex_status_type_t type, uint32_t status);
#if CONFIG_EXTERNAL_COEX_ENABLE
/**
* @brief Setup gpio pin and corresponding pti level, start external coex.
* @param wire_type : to select the whole external coex gpio number.
* @param gpio_pin : gpio pin number to choose.
* @return : ESP_OK - success, other - failed
*/
esp_err_t esp_enable_extern_coex_gpio_pin(external_coex_wire_t wire_type,
esp_external_coex_gpio_set_t gpio_pin);
esp_err_t esp_disable_extern_coex_gpio_pin();
#endif
#ifdef __cplusplus
}

View File

@ -1,21 +1,14 @@
// Copyright 2018-2018 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.
/*
* SPDX-FileCopyrightText: 2018-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef __ESP_COEXIST_INTERNAL_H__
#define __ESP_COEXIST_INTERNAL_H__
#include <stdbool.h>
#include "esp_coexist.h"
#include "esp_coexist_adapter.h"
#ifdef __cplusplus
@ -210,6 +203,29 @@ int coex_schm_curr_phase_idx_get(void);
*/
esp_err_t esp_coex_adapter_register(coex_adapter_funcs_t *funcs);
#if CONFIG_EXTERNAL_COEX_ENABLE
/**
* @brief Set external coexistence pti level and enable it.
*
* @param level1 external coex low pti
* @param level2 external coex mid pti
* @param level3 external coex high pti
*
* @return
* - ESP_OK: succeed
*/
esp_err_t esp_coex_external_set(esp_coex_pti_level_t level1,
esp_coex_pti_level_t level2, esp_coex_pti_level_t level3);
/**
* @brief Disable external coexist
*
* @return
* - ESP_OK: succeed
*/
void esp_coex_external_stop(void);
#endif /*External Coex*/
/**
* @brief Check the MD5 values of the coexistence adapter header files in IDF and WiFi library
*

View File

@ -1,16 +1,8 @@
// Copyright 2015-2016 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.
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef __ESP_WIFI_TYPES_H__
@ -80,6 +72,7 @@ typedef enum {
WIFI_REASON_ASSOC_NOT_AUTHED = 9,
WIFI_REASON_DISASSOC_PWRCAP_BAD = 10,
WIFI_REASON_DISASSOC_SUPCHAN_BAD = 11,
WIFI_REASON_BSS_TRANSITION_DISASSOC = 12,
WIFI_REASON_IE_INVALID = 13,
WIFI_REASON_MIC_FAILURE = 14,
WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT = 15,
@ -250,7 +243,8 @@ typedef struct {
wifi_pmf_config_t pmf_cfg; /**< Configuration for Protected Management Frame. Will be advertized in RSN Capabilities in RSN IE. */
uint32_t rm_enabled:1; /**< Whether Radio Measurements are enabled for the connection */
uint32_t btm_enabled:1; /**< Whether BSS Transition Management is enabled for the connection */
uint32_t reserved:30; /**< Reserved for future feature set */
uint32_t mbo_enabled:1; /**< Whether MBO is enabled for the connection */
uint32_t reserved:29; /**< Reserved for future feature set */
} wifi_sta_config_t;
/** @brief Configuration data for ESP32 AP or STA.