Skip to content

Commit

Permalink
Merge branch 'espressif:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason2866 authored Sep 27, 2023
2 parents 249377d + 272b409 commit 0072a46
Show file tree
Hide file tree
Showing 647 changed files with 12,333 additions and 7,343 deletions.
10 changes: 9 additions & 1 deletion .github/ISSUE_TEMPLATE/02_runtime_bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ body:
placeholder: ex. v3.2-dev-1148-g96cd3b75c
validations:
required: true
- type: input
id: chip_revision
attributes:
label: Espressif SoC revision.
description: On which Espressif SoC revision does your application run on? Run `esptool chip_id` to find it.
placeholder: ex. ESP32-C3 (QFN32) (revision v0.3)
validations:
required: true
- type: dropdown
id: operating_system
attributes:
Expand Down Expand Up @@ -63,7 +71,7 @@ body:
attributes:
label: Development Kit.
description: On which Development Kit does this issue occur on?
placeholder: ex. ESP32-Wrover-Kit v2 | Custom Board
placeholder: ex. ESP32-Wrover-Kit v2 | Custom Board | QEMU
validations:
required: true
- type: dropdown
Expand Down
3 changes: 2 additions & 1 deletion .gitlab/ci/pre_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,12 @@ check_version:
- export IDF_PATH=$PWD
- tools/ci/check_idf_version.sh

check_rom_api_header:
check_api_usage:
extends: .pre_check_template
script:
- tools/ci/check_examples_rom_header.sh
- tools/ci/check_api_violation.sh
- tools/ci/check_examples_extra_component_dirs.sh

test_check_kconfigs:
extends: .pre_check_template
Expand Down
3 changes: 3 additions & 0 deletions .gitlab/dangerjs/dangerfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ async function runChecks() {
// Checks for MR area labels
await require("./mrAreaLabels.js")();

// Checks for Source branch name
require("./mrSourceBranchName.js")();

// Add success log if no issues
if (
results.fails.length === 0 &&
Expand Down
23 changes: 23 additions & 0 deletions .gitlab/dangerjs/mrSourceBranchName.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* Throw Danger WARN if branch name contains more than one slash or uppercase letters
*
* @dangerjs INFO
*/
module.exports = function () {
const sourceBranch = danger.gitlab.mr.source_branch;

// Check if the source branch name contains more than one slash
const slashCount = (sourceBranch.match(/\//g) || []).length;
if (slashCount > 1) {
return message(
`The source branch name \`${sourceBranch}\` contains more than one slash. This can cause troubles with git sync. Please rename the branch.`
);
}

// Check if the source branch name contains any uppercase letters
if (sourceBranch !== sourceBranch.toLowerCase()) {
return message(
`The source branch name \`${sourceBranch}\` contains uppercase letters. This can cause troubles on case-insensitive file systems (macOS). Please use only lowercase letters.`,
);
}
};
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
[submodule "components/bootloader/subproject/components/micro-ecc/micro-ecc"]
path = components/bootloader/subproject/components/micro-ecc/micro-ecc
url = ../../kmackay/micro-ecc.git
sbom-version = 1.0
sbom-version = 1.1
sbom-cpe = cpe:2.3:a:micro-ecc_project:micro-ecc:{}:*:*:*:*:*:*:*
sbom-supplier = Person: Ken MacKay
sbom-url = https://github.com/kmackay/micro-ecc
sbom-description = A small and fast ECDH and ECDSA implementation for 8-bit, 32-bit, and 64-bit processors
sbom-hash = d037ec89546fad14b5c4d5456c2e23a71e554966
sbom-hash = 24c60e243580c7868f4334a1ba3123481fe1aa48

[submodule "components/spiffs/spiffs"]
path = components/spiffs/spiffs
Expand Down
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ repos:
- id: mixed-line-ending
args: ['-f=lf']
- id: double-quote-string-fixer
- id: no-commit-to-branch
name: Do not use more than one slash in the branch name
args: ['--pattern', '^[^/]*/[^/]*/']
- id: no-commit-to-branch
name: Do not use uppercase letters in the branch name
args: ['--pattern', '^[^A-Z]*[A-Z]']
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
hooks:
Expand Down
6 changes: 4 additions & 2 deletions COMPATIBILITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ Supported since ESP-IDF v4.2.
|------------------------|-------------|----------|
| release/v4.2 | v4.2.3 | v4.2.3 |
| release/v4.3 | v4.3.3 | v4.3.3 |
| release/v4.4 | v4.4.1 | v4.4.1 |
| release/v5.0 and above | v5.0 | v5.0 |
| release/v4.4 | v4.4.6 | v4.4.1 |
| release/v5.0 | v5.0.4 | v5.0 |
| release/v5.1 | v5.1.2 | v5.1 |
| release/v5.2 and above | v5.2 | v5.2 |

### ESP32-C3

Expand Down
6 changes: 4 additions & 2 deletions COMPATIBILITY_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@
|------------------------|-------------|----------|
| release/v4.2 | v4.2.3 | v4.2.3 |
| release/v4.3 | v4.3.3 | v4.3.3 |
| release/v4.4 | v4.4.1 | v4.4.1 |
| release/v5.0 及以上 | v5.0 | v5.0 |
| release/v4.4 | v4.4.6 | v4.4.1 |
| release/v5.0 | v5.0.4 | v5.0 |
| release/v5.1 | v5.1.2 | v5.1 |
| release/v5.2 及以上 | v5.2 | v5.2 |

### ESP32-C3

Expand Down
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@ ESP-IDF is the development framework for Espressif SoCs supported on Windows, Li

The following table shows ESP-IDF support of Espressif SoCs where ![alt text][preview] and ![alt text][supported] denote preview status and support, respectively. The preview support is usually limited in time and intended for beta versions of chips. Please use an ESP-IDF release where the desired SoC is already supported.

|Chip | v4.2 | v4.3 | v4.4 | v5.0 | v5.1 | |
|:----------- | :---------------------:| :---------------------:| :---------------------:| :---------------------:| :--------------------: | :----------------------------------------------------------|
|Chip | v4.3 | v4.4 | v5.0 | v5.1 | v5.2 | |
|:----------- | :---------------------:| :---------------------:| :---------------------:| :--------------------: | :--------------------: | :----------------------------------------------------------|
|ESP32 | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | |
|ESP32-S2 | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | |
|ESP32-C3 | | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | |
|ESP32-S3 | | | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | [Announcement](https://www.espressif.com/en/news/ESP32_S3) |
|ESP32-C2 | | | | ![alt text][supported] | ![alt text][supported] | [Announcement](https://www.espressif.com/en/news/ESP32-C2) |
|ESP32-C6 | | | | | ![alt text][supported] | [Announcement](https://www.espressif.com/en/news/ESP32_C6) |
|ESP32-H2 | | | | | ![alt text][supported] | [Announcement](https://www.espressif.com/en/news/ESP32_H2) |
|ESP32-C3 | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | |
|ESP32-S3 | | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | [Announcement](https://www.espressif.com/en/news/ESP32_S3) |
|ESP32-C2 | | | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | [Announcement](https://www.espressif.com/en/news/ESP32-C2) |
|ESP32-C6 | | | | ![alt text][supported] | ![alt text][supported] | [Announcement](https://www.espressif.com/en/news/ESP32_C6) |
|ESP32-H2 | | | | ![alt text][supported] | ![alt text][supported] | [Announcement](https://www.espressif.com/en/news/ESP32_H2) |
|ESP32-P4 | | | | | ![alt text][preview] | [Announcement](https://www.espressif.com/en/news/ESP32-P4) |

[supported]: https://img.shields.io/badge/-supported-green "supported"
[preview]: https://img.shields.io/badge/-preview-orange "preview"
Expand Down Expand Up @@ -120,6 +121,8 @@ This can be combined with other targets, ie `idf.py -p PORT erase-flash flash` w

* Documentation for the latest version: https://docs.espressif.com/projects/esp-idf/. This documentation is built from the [docs directory](docs) of this repository.

* [Beginner's Guide to Key Concepts and Resources of ESP-IDF](https://youtu.be/J8zc8mMNKtc?feature=shared)

* The [esp32.com forum](https://esp32.com/) is a place to ask questions and find community resources.

* [Check the Issues section on github](https://github.com/espressif/esp-idf/issues) if you find a bug or have a feature request. Please check existing Issues before opening a new one.
Expand Down
21 changes: 12 additions & 9 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@ ESP-IDF 是乐鑫官方推出的物联网开发框架,支持 Windows、Linux

下表总结了乐鑫芯片在 ESP-IDF 各版本中的支持状态,其中 ![alt text][supported] 代表已支持,![alt text][preview] 代表目前处于预览支持状态。预览支持状态通常有时间限制,而且仅适用于测试版芯片。请确保使用与芯片相匹配的 ESP-IDF 版本。

|芯片 | v4.2 | v4.3 | v4.4 | v5.0 | v5.1 | |
|:----------- |:---------------------:| :---------------------:| :---------------------:| :---------------------:| :--------------------: | :-------------------------------------------------------------- |
|ESP32 |![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | |
|ESP32-S2 |![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | |
|ESP32-C3 | | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | |
|ESP32-S3 | | | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | [芯片发布公告](https://www.espressif.com/zh-hans/news/ESP32_S3) |
|ESP32-C2 | | | | ![alt text][supported] | ![alt text][supported] | [芯片发布公告](https://www.espressif.com/zh-hans/news/ESP32-C2) |
|ESP32-C6 | | | | | ![alt text][supported] | [芯片发布公告](https://www.espressif.com/zh-hans/news/ESP32_C6) |
|ESP32-H2 | | | | | ![alt text][supported] | [芯片发布公告](https://www.espressif.com/zh-hans/news/ESP32_H2) |
|芯片 | v4.3 | v4.4 | v5.0 | v5.1 | v5.2 | |
|:----------- | :---------------------:| :---------------------:| :---------------------:| :--------------------: | :--------------------: | :-------------------------------------------------------------- |
|ESP32 | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | |
|ESP32-S2 | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | |
|ESP32-C3 | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | |
|ESP32-S3 | | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | [芯片发布公告](https://www.espressif.com/zh-hans/news/ESP32_S3) |
|ESP32-C2 | | | ![alt text][supported] | ![alt text][supported] | ![alt text][supported] | [芯片发布公告](https://www.espressif.com/zh-hans/news/ESP32-C2) |
|ESP32-C6 | | | | ![alt text][supported] | ![alt text][supported] | [芯片发布公告](https://www.espressif.com/zh-hans/news/ESP32_C6) |
|ESP32-H2 | | | | ![alt text][supported] | ![alt text][supported] | [芯片发布公告](https://www.espressif.com/zh-hans/news/ESP32_H2) |
|ESP32-P4 | | | | | ![alt text][preview] | [芯片发布公告](https://www.espressif.com/en/news/ESP32-P4) |

[supported]: https://img.shields.io/badge/-%E6%94%AF%E6%8C%81-green "supported"
[preview]: https://img.shields.io/badge/-%E9%A2%84%E8%A7%88-orange "preview"
Expand Down Expand Up @@ -120,6 +121,8 @@ ESP-IDF 中的子模块采用相对路径([详见 .gitmodules 文件](.gitmodu

* 最新版的文档:https://docs.espressif.com/projects/esp-idf/ ,该文档是由本仓库 [docs 目录](docs) 构建得到。

* [初学者指南:主要概念和资源](https://www.bilibili.com/video/BV1114y1r7du/)

* 可以前往 [esp32.com 论坛](https://esp32.com/) 提问,挖掘社区资源。

* 如果你在使用中发现了错误或者需要新的功能,请先[查看 GitHub Issues](https://github.com/espressif/esp-idf/issues),确保该问题没有重复提交。
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion components/bt/controller/lib_esp32
2 changes: 0 additions & 2 deletions components/bt/esp_ble_mesh/core/prov_node.c
Original file line number Diff line number Diff line change
Expand Up @@ -944,8 +944,6 @@ static void prov_data(const uint8_t *data)
/* Ignore any further PDUs on this link */
prov_link.expect = 0U;

reset_state();

#if CONFIG_BLE_MESH_RPR_SRV
/* For NPPI, no need to perform the following actions */
if (bt_mesh_atomic_test_bit(prov_link.flags, PB_NPPI)) {
Expand Down
22 changes: 22 additions & 0 deletions components/bt/esp_ble_mesh/core/prov_pvnr.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ _Static_assert(BLE_MESH_MAX_CONN >= CONFIG_BLE_MESH_PBG_SAME_TIME,

#define UNICAST_ADDR_LIMIT 0x7FFF

#define PROV_SVC_ADV_RX_CHECK(pre, cur) ((cur) < (pre) ? ((cur) + (UINT32_MAX - (pre)) >= 200) : ((cur) - (pre) >= 200))

/* Provisioner link structure allocation
* |--------------------------------------------------------|
* | Link(PB-ADV) | Link(PB-GATT) |
Expand Down Expand Up @@ -2923,6 +2925,21 @@ int bt_mesh_provisioner_prov_deinit(bool erase)
}
#endif /* CONFIG_BLE_MESH_DEINIT */

static bool bt_mesh_prov_svc_adv_filter(void)
{
static uint32_t timestamp = 0;
static uint32_t pre_timestamp = 0;

timestamp = k_uptime_get_32();

if (PROV_SVC_ADV_RX_CHECK(pre_timestamp, timestamp)) {
pre_timestamp = timestamp;
return false;
}

return true;
}

static bool notify_unprov_dev_info(bt_mesh_prov_bearer_t bearer, const uint8_t uuid[16],
const bt_mesh_addr_t *addr, uint16_t oob_info, int8_t rssi)
{
Expand All @@ -2940,6 +2957,11 @@ static bool notify_unprov_dev_info(bt_mesh_prov_bearer_t bearer, const uint8_t u

if (i == ARRAY_SIZE(unprov_dev)) {
BT_DBG("Device not in queue, notify to app layer");

if (bt_mesh_prov_svc_adv_filter()) {
return true;
}

if (notify_unprov_adv_pkt_cb) {
notify_unprov_adv_pkt_cb(addr->val, addr->type, adv_type,
uuid, oob_info, bearer, rssi);
Expand Down
7 changes: 7 additions & 0 deletions components/bt/host/bluedroid/Kconfig.in
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ config BT_BLUEDROID_MEM_DEBUG
help
Bluedroid memory debug

config BT_BLUEDROID_ESP_COEX_VSC
bool "Enable Espressif Vendor-specific HCI commands for coexist status configuration"
depends on BT_BLUEDROID_ENABLED
default y
help
Enable Espressif Vendor-specific HCI commands for coexist status configuration

config BT_CLASSIC_ENABLED
bool "Classic Bluetooth"
depends on BT_BLUEDROID_ENABLED && IDF_TARGET_ESP32
Expand Down
5 changes: 5 additions & 0 deletions components/bt/host/bluedroid/api/esp_a2dp_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,11 @@ esp_err_t esp_a2d_media_ctrl(esp_a2d_media_ctrl_t ctrl)
return ESP_ERR_INVALID_STATE;
}

if (ctrl == ESP_A2D_MEDIA_CTRL_STOP) {
LOG_WARN("ESP_A2D_MEDIA_CTRL_STOP is deprecated, using ESP_A2D_MEDIA_CTRL_SUSPEND instead.\n");
ctrl = ESP_A2D_MEDIA_CTRL_SUSPEND;
}

bt_status_t stat;
btc_av_args_t arg;
btc_msg_t msg;
Expand Down
21 changes: 21 additions & 0 deletions components/bt/host/bluedroid/api/esp_bt_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,24 @@ esp_err_t esp_bt_dev_set_device_name(const char *name)

return (btc_transfer_context(&msg, &arg, sizeof(btc_dev_args_t), NULL, NULL) == BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
}

#if (ESP_COEX_VSC_INCLUDED == TRUE)
esp_err_t esp_bt_dev_coex_status_config(esp_bt_dev_coex_type_t type, esp_bt_dev_coex_op_t op, uint8_t status)
{
btc_msg_t msg = {0};
btc_dev_args_t arg;

if (esp_bluedroid_get_status() != ESP_BLUEDROID_STATUS_ENABLED) {
return ESP_ERR_INVALID_STATE;
}

msg.sig = BTC_SIG_API_CALL;
msg.pid = BTC_PID_DEV;
msg.act = BTC_DEV_ACT_CFG_COEX_STATUS;
arg.cfg_coex_status.type = type;
arg.cfg_coex_status.op = op;
arg.cfg_coex_status.status = status;

return (btc_transfer_context(&msg, &arg, sizeof(btc_dev_args_t), NULL, NULL) == BT_STATUS_SUCCESS ? ESP_OK : ESP_FAIL);
}
#endif
7 changes: 4 additions & 3 deletions components/bt/host/bluedroid/api/include/api/esp_a2dp_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,10 @@ typedef enum {
* @brief Bluetooth A2DP datapath states
*/
typedef enum {
ESP_A2D_AUDIO_STATE_REMOTE_SUSPEND = 0, /*!< audio stream datapath suspended by remote device */
ESP_A2D_AUDIO_STATE_STOPPED, /*!< audio stream datapath stopped */
ESP_A2D_AUDIO_STATE_SUSPEND = 0, /*!< audio stream datapath suspended by remote device */
ESP_A2D_AUDIO_STATE_STARTED, /*!< audio stream datapath started */
ESP_A2D_AUDIO_STATE_STOPPED = ESP_A2D_AUDIO_STATE_SUSPEND, /*!< @note Deprecated */
ESP_A2D_AUDIO_STATE_REMOTE_SUSPEND = ESP_A2D_AUDIO_STATE_SUSPEND, /*!< @note Deprecated */
} esp_a2d_audio_state_t;

/**
Expand All @@ -90,8 +91,8 @@ typedef enum {
ESP_A2D_MEDIA_CTRL_NONE = 0, /*!< Not for application use, use inside stack only. */
ESP_A2D_MEDIA_CTRL_CHECK_SRC_RDY, /*!< check whether AVDTP is connected, only used in A2DP source */
ESP_A2D_MEDIA_CTRL_START, /*!< command to set up media transmission channel */
ESP_A2D_MEDIA_CTRL_STOP, /*!< command to stop media transmission */
ESP_A2D_MEDIA_CTRL_SUSPEND, /*!< command to suspend media transmission */
ESP_A2D_MEDIA_CTRL_STOP, /*!< @note Deprecated, Please use ESP_A2D_MEDIA_CTRL_SUSPEND */
} esp_a2d_media_ctrl_t;

/**
Expand Down
Loading

0 comments on commit 0072a46

Please sign in to comment.