Skip to content

Commit dc9ef69

Browse files
authored
Merge branch 'espressif:release/v3.0.x' into release/v3.0.x
2 parents 19fd03e + fd2e31a commit dc9ef69

File tree

20 files changed

+256
-3
lines changed

20 files changed

+256
-3
lines changed

cores/esp32/esp32-hal-uart.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
#include "hal/gpio_hal.h"
3434
#include "esp_rom_gpio.h"
3535

36-
static int s_uart_debug_nr = 0; // UART number for debug output
36+
static int s_uart_debug_nr = 0; // UART number for debug output
37+
#define REF_TICK_BAUDRATE_LIMIT 250000 // this is maximum UART badrate using REF_TICK as clock source
3738

3839
struct uart_struct_t {
3940

@@ -508,7 +509,7 @@ uart_t *uartBegin(
508509
#if SOC_UART_SUPPORT_XTAL_CLK
509510
uart_config.source_clk = UART_SCLK_XTAL; // valid for C2, S3, C3, C6, H2 and P4
510511
#elif SOC_UART_SUPPORT_REF_TICK
511-
if (baudrate <= 250000) {
512+
if (baudrate <= REF_TICK_BAUDRATE_LIMIT) {
512513
uart_config.source_clk = UART_SCLK_REF_TICK; // valid for ESP32, S2 - MAX supported baud rate is 250 Kbps
513514
} else {
514515
uart_config.source_clk = UART_SCLK_APB; // baudrate may change with the APB Frequency!
@@ -790,6 +791,10 @@ void uartSetBaudRate(uart_t *uart, uint32_t baud_rate) {
790791
return;
791792
}
792793
UART_MUTEX_LOCK();
794+
#if !SOC_UART_SUPPORT_XTAL_CLK
795+
uart_sclk_t newClkSrc = baud_rate <= REF_TICK_BAUDRATE_LIMIT ? UART_SCLK_REF_TICK : UART_SCLK_APB;
796+
uart_ll_set_sclk(UART_LL_GET_HW(uart->num), newClkSrc);
797+
#endif
793798
if (uart_set_baudrate(uart->num, baud_rate) == ESP_OK) {
794799
uart->_baudrate = baud_rate;
795800
} else {

libraries/ArduinoOTA/examples/BasicOTA/BasicOTA.ino

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2024 Espressif Systems (Shanghai) PTE LTD
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
#include <WiFi.h>
216
#include <ESPmDNS.h>
317
#include <NetworkUdp.h>

libraries/ArduinoOTA/keywords.txt

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,40 @@
77
#######################################
88

99
ArduinoOTA KEYWORD1
10+
ArduinoOTAClass KEYWORD1
1011

1112
#######################################
1213
# Methods and Functions (KEYWORD2)
1314
#######################################
1415

1516
begin KEYWORD2
16-
setup KEYWORD2
17+
end KEYWORD2
1718
handle KEYWORD2
1819
onStart KEYWORD2
1920
onEnd KEYWORD2
2021
onError KEYWORD2
2122
onProgress KEYWORD2
23+
setPort KEYWORD2
24+
setHostname KEYWORD2
25+
getHostname KEYWORD2
26+
setPassword KEYWORD2
27+
setPasswordHash KEYWORD2
28+
setPartitionLabel KEYWORD2
29+
getPartitionLabel KEYWORD2
30+
setRebootOnSuccess KEYWORD2
31+
setMdnsEnabled KEYWORD2
32+
getCommand KEYWORD2
33+
setTimeout KEYWORD2
2234

2335
#######################################
2436
# Constants (LITERAL1)
2537
#######################################
38+
39+
OTA_IDLE LITERAL1
40+
OTA_WAITAUTH LITERAL1
41+
OTA_RUNUPDATE LITERAL1
42+
OTA_AUTH_ERROR LITERAL1
43+
OTA_BEGIN_ERROR LITERAL1
44+
OTA_CONNECT_ERROR LITERAL1
45+
OTA_RECEIVE_ERROR LITERAL1
46+
OTA_END_ERROR LITERAL1

libraries/ArduinoOTA/src/ArduinoOTA.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2024 Espressif Systems (Shanghai) PTE LTD
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
#ifndef LWIP_OPEN_SRC
216
#define LWIP_OPEN_SRC
317
#endif

libraries/ArduinoOTA/src/ArduinoOTA.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2024 Espressif Systems (Shanghai) PTE LTD
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
#ifndef __ARDUINO_OTA_H
216
#define __ARDUINO_OTA_H
317

libraries/OpenThread/examples/COAP/coap_lamp/coap_lamp.ino

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2024 Espressif Systems (Shanghai) PTE LTD
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
#include "OThreadCLI.h"
216
#include "OThreadCLI_Util.h"
317

libraries/OpenThread/examples/COAP/coap_switch/coap_switch.ino

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2024 Espressif Systems (Shanghai) PTE LTD
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
#include "OThreadCLI.h"
216
#include "OThreadCLI_Util.h"
317

libraries/OpenThread/examples/SimpleCLI/SimpleCLI.ino

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2024 Espressif Systems (Shanghai) PTE LTD
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
/*
216
* OpenThread.begin(false) will not automatically start a node in a Thread Network
317
* The user will need to start it manually using the OpenThread CLI commands

libraries/OpenThread/examples/SimpleNode/SimpleNode.ino

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2024 Espressif Systems (Shanghai) PTE LTD
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
/*
216
* OpenThread.begin() will automatically start a node in a Thread Network
317
* If NVS is empty, default configuration will be as follow:

libraries/OpenThread/examples/SimpleThreadNetwork/ExtendedRouterNode/ExtendedRouterNode.ino

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2024 Espressif Systems (Shanghai) PTE LTD
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
#include "OThreadCLI.h"
216
#include "OThreadCLI_Util.h"
317

libraries/OpenThread/examples/SimpleThreadNetwork/LeaderNode/LeaderNode.ino

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2024 Espressif Systems (Shanghai) PTE LTD
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
/*
216
OpenThread.begin(false) will not automatically start a node in a Thread Network
317
A Leader node is the first device, that has a complete dataset, to start Thread

libraries/OpenThread/examples/SimpleThreadNetwork/RouterNode/RouterNode.ino

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2024 Espressif Systems (Shanghai) PTE LTD
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
/*
216
OpenThread.begin(false) will not automatically start a node in a Thread Network
317
A Router/Child node is the device that will join an existing Thread Network

libraries/OpenThread/examples/ThreadScan/ThreadScan.ino

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2024 Espressif Systems (Shanghai) PTE LTD
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
/*
216
OpenThread.begin(true) will automatically start a node in a Thread Network
317
Full scanning requires the thread node to be at least in Child state.

libraries/OpenThread/examples/onReceive/onReceive.ino

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2024 Espressif Systems (Shanghai) PTE LTD
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
/*
216
OpenThread.begin() will automatically start a node in a Thread Network
317
This will demonstrate how to capture the CLI response in a callback function

libraries/OpenThread/src/OThreadCLI.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2024 Espressif Systems (Shanghai) PTE LTD
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
#include "OThreadCLI.h"
216
#if SOC_IEEE802154_SUPPORTED
317
#if CONFIG_OPENTHREAD_ENABLED

libraries/OpenThread/src/OThreadCLI.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2024 Espressif Systems (Shanghai) PTE LTD
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
#pragma once
216
#include "soc/soc_caps.h"
317
#include "sdkconfig.h"

libraries/OpenThread/src/OThreadCLI_Util.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2024 Espressif Systems (Shanghai) PTE LTD
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
#include "OThreadCLI.h"
216
#if SOC_IEEE802154_SUPPORTED
317
#if CONFIG_OPENTHREAD_ENABLED

libraries/OpenThread/src/OThreadCLI_Util.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2024 Espressif Systems (Shanghai) PTE LTD
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
#pragma once
216
#include "soc/soc_caps.h"
317
#include "sdkconfig.h"

libraries/Zigbee/src/ZigbeeEP.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ void ZigbeeEP::reportBatteryPercentage() {
104104
esp_zb_zcl_report_attr_cmd_t report_attr_cmd;
105105
report_attr_cmd.address_mode = ESP_ZB_APS_ADDR_MODE_DST_ADDR_ENDP_NOT_PRESENT;
106106
report_attr_cmd.attributeID = ESP_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_PERCENTAGE_REMAINING_ID;
107+
report_attr_cmd.direction = ESP_ZB_ZCL_CMD_DIRECTION_TO_CLI;
107108
report_attr_cmd.clusterID = ESP_ZB_ZCL_CLUSTER_ID_POWER_CONFIG;
108109
report_attr_cmd.zcl_basic_cmd.src_endpoint = _endpoint;
109110

libraries/Zigbee/src/ep/ZigbeeTempSensor.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ void ZigbeeTempSensor::reportTemperature() {
8080
esp_zb_zcl_report_attr_cmd_t report_attr_cmd;
8181
report_attr_cmd.address_mode = ESP_ZB_APS_ADDR_MODE_DST_ADDR_ENDP_NOT_PRESENT;
8282
report_attr_cmd.attributeID = ESP_ZB_ZCL_ATTR_TEMP_MEASUREMENT_VALUE_ID;
83+
report_attr_cmd.direction = ESP_ZB_ZCL_CMD_DIRECTION_TO_CLI;
8384
report_attr_cmd.clusterID = ESP_ZB_ZCL_CLUSTER_ID_TEMP_MEASUREMENT;
8485
report_attr_cmd.zcl_basic_cmd.src_endpoint = _endpoint;
8586

@@ -120,6 +121,7 @@ void ZigbeeTempSensor::reportHumidity() {
120121
esp_zb_zcl_report_attr_cmd_t report_attr_cmd;
121122
report_attr_cmd.address_mode = ESP_ZB_APS_ADDR_MODE_DST_ADDR_ENDP_NOT_PRESENT;
122123
report_attr_cmd.attributeID = ESP_ZB_ZCL_ATTR_REL_HUMIDITY_MEASUREMENT_VALUE_ID;
124+
report_attr_cmd.direction = ESP_ZB_ZCL_CMD_DIRECTION_TO_CLI;
123125
report_attr_cmd.clusterID = ESP_ZB_ZCL_CLUSTER_ID_REL_HUMIDITY_MEASUREMENT;
124126
report_attr_cmd.zcl_basic_cmd.src_endpoint = _endpoint;
125127

0 commit comments

Comments
 (0)