Skip to content

Commit 8da6269

Browse files
authored
Merge branch 'espressif:release/v5.4' into release/v5.4
2 parents fdcd8ed + 6b7b8ea commit 8da6269

File tree

84 files changed

+1527
-586
lines changed

Some content is hidden

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

84 files changed

+1527
-586
lines changed

.gitlab/ci/common.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ stages:
66
- pre_check
77
- build
88
- assign_test
9+
- build_doc
910
- target_test
1011
- host_test
11-
- build_doc
1212
- test_deploy
1313
- deploy
1414
- post_deploy
@@ -40,7 +40,7 @@ variables:
4040
GIT_FETCH_EXTRA_FLAGS: "--no-recurse-submodules --prune --prune-tags"
4141
# we're using .cache folder for caches
4242
GIT_CLEAN_FLAGS: -ffdx -e .cache/
43-
LATEST_GIT_TAG: v5.4-beta1
43+
LATEST_GIT_TAG: v5.4
4444

4545
SUBMODULE_FETCH_TOOL: "tools/ci/ci_fetch_submodule.py"
4646
# by default we will fetch all submodules

.gitlab/ci/docs.yml

Lines changed: 16 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -37,25 +37,16 @@
3737
.if-dev-push: &if-dev-push
3838
if: '$CI_COMMIT_REF_NAME != "master" && $CI_COMMIT_BRANCH !~ /^release\/v/ && $CI_COMMIT_TAG !~ /^v\d+\.\d+(\.\d+)?($|-)/ && $CI_COMMIT_TAG !~ /^qa-test/ && ($CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "merge_request_event")'
3939

40-
.if-schedule: &if-schedule
41-
if: '$CI_PIPELINE_SOURCE == "schedule"'
42-
4340
.doc-rules:build:docs-full:
4441
rules:
4542
- <<: *if-qa-test-tag
4643
when: never
47-
- <<: *if-schedule
44+
- <<: *if-protected
4845
- <<: *if-label-build_docs
4946
- <<: *if-label-docs_full
5047
- <<: *if-dev-push
5148
changes: *patterns-docs-full
5249

53-
.doc-rules:build:docs-full-prod:
54-
rules:
55-
- <<: *if-qa-test-tag
56-
when: never
57-
- <<: *if-protected-no_label
58-
5950
.doc-rules:build:docs-partial:
6051
rules:
6152
- <<: *if-qa-test-tag
@@ -92,13 +83,14 @@ check_docs_lang_sync:
9283
stage: build_doc
9384
tags:
9485
- build_docs
86+
needs:
87+
- job: fast_template_app
88+
artifacts: false
89+
optional: true
9590
script:
9691
- if [ -n "${BREATHE_ALT_INSTALL_URL}" ]; then pip uninstall -y breathe && pip install -U ${BREATHE_ALT_INSTALL_URL}; fi
9792
- cd docs
9893
- build-docs -t $DOCTGT -bs $DOC_BUILDERS -l $DOCLANG build
99-
artifacts:
100-
expire_in: 4 days
101-
when: always
10294
parallel:
10395
matrix:
10496
- DOCLANG: ["en", "zh_CN"]
@@ -119,41 +111,25 @@ build_docs_html_full:
119111
extends:
120112
- .build_docs_template
121113
- .doc-rules:build:docs-full
122-
needs:
123-
- job: fast_template_app
124-
artifacts: false
125-
optional: true
126-
artifacts:
127-
paths:
128-
- docs/_build/*/*/*.txt
129-
- docs/_build/*/*/html/*
130-
variables:
131-
DOC_BUILDERS: "html"
132-
133-
build_docs_html_full_prod:
134-
extends:
135-
- .build_docs_template
136-
- .doc-rules:build:docs-full-prod
137-
dependencies: [] # Stop build_docs jobs from downloading all previous job's artifacts
138114
artifacts:
115+
when: always
139116
paths:
140117
- docs/_build/*/*/*.txt
141118
- docs/_build/*/*/html/*
119+
expire_in: 4 days
142120
variables:
143121
DOC_BUILDERS: "html"
144122

145123
build_docs_html_partial:
146124
extends:
147125
- .build_docs_template
148126
- .doc-rules:build:docs-partial
149-
needs:
150-
- job: fast_template_app
151-
artifacts: false
152-
optional: true
153127
artifacts:
128+
when: always
154129
paths:
155130
- docs/_build/*/*/*.txt
156131
- docs/_build/*/*/html/*
132+
expire_in: 4 days
157133
variables:
158134
DOC_BUILDERS: "html"
159135
parallel:
@@ -163,33 +139,6 @@ build_docs_html_partial:
163139
- DOCLANG: "zh_CN"
164140
DOCTGT: "esp32p4"
165141

166-
build_docs_pdf:
167-
extends:
168-
- .build_docs_template
169-
- .doc-rules:build:docs-full
170-
needs:
171-
- job: fast_template_app
172-
artifacts: false
173-
optional: true
174-
allow_failure: true # TODO IDFCI-2216
175-
artifacts:
176-
paths:
177-
- docs/_build/*/*/latex/*
178-
variables:
179-
DOC_BUILDERS: "latex"
180-
181-
build_docs_pdf_prod:
182-
extends:
183-
- .build_docs_template
184-
- .doc-rules:build:docs-full-prod
185-
dependencies: [] # Stop build_docs jobs from downloading all previous job's artifacts
186-
allow_failure: true # TODO IDFCI-2216
187-
artifacts:
188-
paths:
189-
- docs/_build/*/*/latex/*
190-
variables:
191-
DOC_BUILDERS: "latex"
192-
193142
.deploy_docs_template:
194143
image: $ESP_IDF_DOC_ENV_IMAGE
195144
variables:
@@ -218,8 +167,6 @@ deploy_docs_preview:
218167
optional: true
219168
- job: build_docs_html_full
220169
optional: true
221-
- job: build_docs_pdf
222-
optional: true
223170
variables:
224171
TYPE: "preview"
225172
# older branches use DOCS_DEPLOY_KEY, DOCS_SERVER, DOCS_SERVER_USER, DOCS_PATH for preview server so we keep these names for 'preview'
@@ -234,12 +181,12 @@ deploy_docs_production:
234181
# The DOCS_PROD_* variables used by this job are "Protected" so these branches must all be marked "Protected" in Gitlab settings
235182
extends:
236183
- .deploy_docs_template
237-
- .doc-rules:build:docs-full-prod
184+
rules:
185+
- <<: *if-protected-no_label
238186
stage: post_deploy
239187
dependencies: # set dependencies to null to avoid missing artifacts issue
240188
needs: # ensure runs after push_to_github succeeded
241-
- build_docs_html_full_prod
242-
- build_docs_pdf_prod
189+
- build_docs_html_full
243190
- job: push_to_github
244191
artifacts: false
245192
variables:
@@ -254,16 +201,19 @@ deploy_docs_production:
254201
check_doc_links:
255202
extends:
256203
- .build_docs_template
257-
- .doc-rules:build:docs-full-prod
204+
rules:
205+
- <<: *if-protected-no_label
258206
stage: post_deploy
259207
needs:
260208
- job: deploy_docs_production
261209
artifacts: false
262210
tags: ["build", "amd64", "internet"]
263211
artifacts:
212+
when: always
264213
paths:
265214
- docs/_build/*/*/*.txt
266215
- docs/_build/*/*/linkcheck/*.txt
216+
expire_in: 1 week
267217
allow_failure: true
268218
script:
269219
- cd docs

components/bootloader_support/src/bootloader_console.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ void bootloader_console_init(void)
7474
// Enable the peripheral
7575
uart_ll_enable_bus_clock(uart_num, true);
7676
uart_ll_reset_register(uart_num);
77+
// Set clock source
78+
#if SOC_UART_SUPPORT_XTAL_CLK
79+
uart_ll_set_sclk(UART_LL_GET_HW(uart_num), (soc_module_clk_t)UART_SCLK_XTAL);
80+
#else
81+
uart_ll_set_sclk(UART_LL_GET_HW(uart_num), (soc_module_clk_t)UART_SCLK_APB);
82+
#endif
7783
// Reset TX and RX FIFOs
7884
uart_ll_txfifo_rst(UART_LL_GET_HW(uart_num));
7985
uart_ll_rxfifo_rst(UART_LL_GET_HW(uart_num));

components/bt/host/bluedroid/bta/gatt/bta_gattc_act.c

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -526,12 +526,20 @@ void bta_gattc_open(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data)
526526
if (p_data->api_conn.is_aux) {
527527
#if (BLE_50_FEATURE_SUPPORT == TRUE)
528528
p_dev_rec->ext_conn_params.phy_mask = p_data->api_conn.phy_mask;
529-
memcpy(&p_dev_rec->ext_conn_params.phy_1m_conn_params, &p_data->api_conn.phy_1m_conn_params, sizeof(tBTA_BLE_CONN_PARAMS));
530-
memcpy(&p_dev_rec->ext_conn_params.phy_2m_conn_params, &p_data->api_conn.phy_2m_conn_params, sizeof(tBTA_BLE_CONN_PARAMS));
531-
memcpy(&p_dev_rec->ext_conn_params.phy_coded_conn_params, &p_data->api_conn.phy_coded_conn_params, sizeof(tBTA_BLE_CONN_PARAMS));
529+
if (p_data->api_conn.phy_mask & BTA_BLE_PHY_1M_MASK) {
530+
memcpy(&p_dev_rec->ext_conn_params.phy_1m_conn_params, &p_data->api_conn.phy_1m_conn_params, sizeof(tBTA_BLE_CONN_PARAMS));
531+
}
532+
if (p_data->api_conn.phy_mask & BTA_BLE_PHY_2M_MASK) {
533+
memcpy(&p_dev_rec->ext_conn_params.phy_2m_conn_params, &p_data->api_conn.phy_2m_conn_params, sizeof(tBTA_BLE_CONN_PARAMS));
534+
}
535+
if (p_data->api_conn.phy_mask & BTA_BLE_PHY_CODED_MASK) {
536+
memcpy(&p_dev_rec->ext_conn_params.phy_coded_conn_params, &p_data->api_conn.phy_coded_conn_params, sizeof(tBTA_BLE_CONN_PARAMS));
537+
}
532538
#endif
533539
} else {
534-
memcpy(&p_dev_rec->conn_params, &p_data->api_conn.phy_1m_conn_params, sizeof(tBTA_BLE_CONN_PARAMS));
540+
if (p_data->api_conn.phy_mask & BTA_BLE_PHY_1M_MASK) {
541+
memcpy(&p_dev_rec->conn_params, &p_data->api_conn.phy_1m_conn_params, sizeof(tBTA_BLE_CONN_PARAMS));
542+
}
535543
}
536544
} else {
537545
APPL_TRACE_ERROR("Unknown Device, setting rejected");

components/bt/host/bluedroid/bta/gatt/bta_gattc_api.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,15 @@ void BTA_GATTC_Enh_Open(tBTA_GATTC_IF client_if, BD_ADDR remote_bda, tBTA_ADDR_T
160160
p_buf->own_addr_type = own_addr_type;
161161
p_buf->phy_mask = phy_mask;
162162
memcpy(p_buf->remote_bda, remote_bda, BD_ADDR_LEN);
163-
memcpy(&p_buf->phy_1m_conn_params, phy_1m_conn_params, sizeof(tBTA_BLE_CONN_PARAMS));
164-
memcpy(&p_buf->phy_2m_conn_params, phy_2m_conn_params, sizeof(tBTA_BLE_CONN_PARAMS));
165-
memcpy(&p_buf->phy_coded_conn_params, phy_coded_conn_params, sizeof(tBTA_BLE_CONN_PARAMS));
163+
if ((phy_mask & BTA_BLE_PHY_1M_MASK) && phy_1m_conn_params) {
164+
memcpy(&p_buf->phy_1m_conn_params, phy_1m_conn_params, sizeof(tBTA_BLE_CONN_PARAMS));
165+
}
166+
if ((phy_mask & BTA_BLE_PHY_2M_MASK) && phy_2m_conn_params) {
167+
memcpy(&p_buf->phy_2m_conn_params, phy_2m_conn_params, sizeof(tBTA_BLE_CONN_PARAMS));
168+
}
169+
if ((phy_mask & BTA_BLE_PHY_CODED_MASK) && phy_coded_conn_params) {
170+
memcpy(&p_buf->phy_coded_conn_params, phy_coded_conn_params, sizeof(tBTA_BLE_CONN_PARAMS));
171+
}
166172

167173
bta_sys_sendmsg(p_buf);
168174
}

components/bt/host/bluedroid/btc/profile/std/hf_ag/btc_hf_ag.c

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -316,12 +316,17 @@ bt_status_t btc_hf_init(void)
316316
{
317317
int idx = 0;
318318

319-
if (hf_local_param[idx].btc_hf_cb.initialized) {
320-
esp_hf_cb_param_t param = {
321-
.prof_stat.state = ESP_HF_INIT_ALREADY,
322-
};
323-
btc_hf_cb_to_app(ESP_HF_PROF_STATE_EVT, &param);
324-
return BT_STATUS_SUCCESS;
319+
#if HFP_DYNAMIC_MEMORY == TRUE
320+
if (hf_local_param)
321+
#endif
322+
{
323+
if (hf_local_param[idx].btc_hf_cb.initialized) {
324+
esp_hf_cb_param_t param = {
325+
.prof_stat.state = ESP_HF_INIT_ALREADY,
326+
};
327+
btc_hf_cb_to_app(ESP_HF_PROF_STATE_EVT, &param);
328+
return BT_STATUS_SUCCESS;
329+
}
325330
}
326331

327332
BTC_TRACE_DEBUG("%s - max_hf_clients=%d", __func__, btc_max_hf_clients);
@@ -364,12 +369,18 @@ void btc_hf_deinit(void)
364369
BTC_TRACE_EVENT("%s", __FUNCTION__);
365370

366371
int idx = 0;
367-
if (!hf_local_param[idx].btc_hf_cb.initialized) {
368-
esp_hf_cb_param_t param = {
369-
.prof_stat.state = ESP_HF_DEINIT_ALREADY,
370-
};
371-
btc_hf_cb_to_app(ESP_HF_PROF_STATE_EVT, &param);
372-
return;
372+
373+
#if HFP_DYNAMIC_MEMORY == TRUE
374+
if (hf_local_param)
375+
#endif
376+
{
377+
if (!hf_local_param[idx].btc_hf_cb.initialized) {
378+
esp_hf_cb_param_t param = {
379+
.prof_stat.state = ESP_HF_DEINIT_ALREADY,
380+
};
381+
btc_hf_cb_to_app(ESP_HF_PROF_STATE_EVT, &param);
382+
return;
383+
}
373384
}
374385

375386
btc_dm_disable_service(BTA_HFP_SERVICE_ID);
@@ -1285,12 +1296,17 @@ void btc_hf_cb_handler(btc_msg_t *msg)
12851296
case BTA_AG_DISABLE_EVT:
12861297
{
12871298
idx = 0;
1288-
btc_hf_cb_release();
1289-
if (hf_local_param[idx].btc_hf_cb.initialized) {
1290-
param.prof_stat.state = ESP_HF_DEINIT_SUCCESS;
1291-
btc_hf_cb_to_app(ESP_HF_PROF_STATE_EVT, &param);
1299+
#if HFP_DYNAMIC_MEMORY == TRUE
1300+
if (hf_local_param)
1301+
#endif
1302+
{
1303+
if (hf_local_param[idx].btc_hf_cb.initialized) {
1304+
hf_local_param[idx].btc_hf_cb.initialized = false;
1305+
btc_hf_cb_release();
1306+
param.prof_stat.state = ESP_HF_DEINIT_SUCCESS;
1307+
btc_hf_cb_to_app(ESP_HF_PROF_STATE_EVT, &param);
1308+
}
12921309
}
1293-
hf_local_param[idx].btc_hf_cb.initialized = false;
12941310
break;
12951311
}
12961312
case BTA_AG_REGISTER_EVT:

components/esp_adc/adc_continuous.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,22 @@ esp_err_t adc_continuous_start(adc_continuous_handle_t handle)
294294
}
295295
#endif //#if SOC_ADC_ARBITER_SUPPORTED
296296

297+
#if SOC_ADC_MONITOR_SUPPORTED
298+
adc_ll_digi_monitor_clear_intr();
299+
for (int i = 0; i < SOC_ADC_DIGI_MONITOR_NUM; i++) {
300+
adc_monitor_t *monitor_ctx = handle->adc_monitor[i];
301+
if (monitor_ctx) {
302+
// config monitor hardware
303+
adc_hal_digi_monitor_set_thres(monitor_ctx->monitor_id, monitor_ctx->config.adc_unit, monitor_ctx->config.channel, monitor_ctx->config.h_threshold, monitor_ctx->config.l_threshold);
304+
// if monitor not enabled now, just using monitor api later
305+
if (monitor_ctx->fsm == ADC_MONITOR_FSM_ENABLED) {
306+
// restore the started FSM
307+
adc_ll_digi_monitor_user_start(monitor_ctx->monitor_id, ((monitor_ctx->config.h_threshold >= 0) || (monitor_ctx->config.l_threshold >= 0)));
308+
}
309+
}
310+
}
311+
#endif //#if SOC_ADC_MONITOR_SUPPORTED
312+
297313
if (handle->use_adc1) {
298314
adc_hal_set_controller(ADC_UNIT_1, ADC_HAL_CONTINUOUS_READ_MODE);
299315
}

0 commit comments

Comments
 (0)