From 15e87ae47305159359ff547656980f76d61bfa24 Mon Sep 17 00:00:00 2001 From: Rodrigo Garcia Date: Mon, 26 Aug 2024 19:54:19 -0300 Subject: [PATCH 1/5] fix(uart): sleep retention sets new flag from IDF 5.3 that causes error with Serial.begin(115200). --- cores/esp32/esp32-hal-uart.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cores/esp32/esp32-hal-uart.c b/cores/esp32/esp32-hal-uart.c index e4432f5110f..a07afb55ee6 100644 --- a/cores/esp32/esp32-hal-uart.c +++ b/cores/esp32/esp32-hal-uart.c @@ -497,6 +497,7 @@ uart_t *uartBegin( log_v("UART%d not installed. Starting installation", uart_nr); } uart_config_t uart_config; + uart_config.flags.backup_before_sleep = false; // necessary within IDF 5.3 uart_config.data_bits = (config & 0xc) >> 2; uart_config.parity = (config & 0x3); uart_config.stop_bits = (config & 0x30) >> 4; From 66c9ddbd9e13a456324f1c306e19c9f9bd99dc21 Mon Sep 17 00:00:00 2001 From: Rodrigo Garcia Date: Mon, 26 Aug 2024 20:00:33 -0300 Subject: [PATCH 2/5] fix(typo): typo and commentaries --- cores/esp32/esp32-hal-uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cores/esp32/esp32-hal-uart.c b/cores/esp32/esp32-hal-uart.c index a07afb55ee6..892b5227ef4 100644 --- a/cores/esp32/esp32-hal-uart.c +++ b/cores/esp32/esp32-hal-uart.c @@ -497,7 +497,7 @@ uart_t *uartBegin( log_v("UART%d not installed. Starting installation", uart_nr); } uart_config_t uart_config; - uart_config.flags.backup_before_sleep = false; // necessary within IDF 5.3 + uart_config.flags.backup_before_sleep = false; // necessary within IDF v5.3 uart_config.data_bits = (config & 0xc) >> 2; uart_config.parity = (config & 0x3); uart_config.stop_bits = (config & 0x30) >> 4; From d2100bb65d7c542a96e0d7284c3fdb81e8adcdd1 Mon Sep 17 00:00:00 2001 From: Rodrigo Garcia Date: Tue, 27 Aug 2024 11:54:59 -0300 Subject: [PATCH 3/5] feat(uart): adds memset to make structure empty --- cores/esp32/esp32-hal-uart.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cores/esp32/esp32-hal-uart.c b/cores/esp32/esp32-hal-uart.c index 892b5227ef4..4983a3a3d47 100644 --- a/cores/esp32/esp32-hal-uart.c +++ b/cores/esp32/esp32-hal-uart.c @@ -497,7 +497,8 @@ uart_t *uartBegin( log_v("UART%d not installed. Starting installation", uart_nr); } uart_config_t uart_config; - uart_config.flags.backup_before_sleep = false; // necessary within IDF v5.3 + memset(&uart_config, 0, sizeof(uart_config_t); + uart_config.flags.backup_before_sleep = false; // new flag from IDF v5.3 uart_config.data_bits = (config & 0xc) >> 2; uart_config.parity = (config & 0x3); uart_config.stop_bits = (config & 0x30) >> 4; From 99dcfafbc1ccff9dda96b62e4663758fda8054e8 Mon Sep 17 00:00:00 2001 From: Rodrigo Garcia Date: Tue, 27 Aug 2024 11:56:19 -0300 Subject: [PATCH 4/5] fix(uart): missing parentesis - typo --- cores/esp32/esp32-hal-uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cores/esp32/esp32-hal-uart.c b/cores/esp32/esp32-hal-uart.c index 4983a3a3d47..fa5f8c83150 100644 --- a/cores/esp32/esp32-hal-uart.c +++ b/cores/esp32/esp32-hal-uart.c @@ -497,7 +497,7 @@ uart_t *uartBegin( log_v("UART%d not installed. Starting installation", uart_nr); } uart_config_t uart_config; - memset(&uart_config, 0, sizeof(uart_config_t); + memset(&uart_config, 0, sizeof(uart_config_t)); uart_config.flags.backup_before_sleep = false; // new flag from IDF v5.3 uart_config.data_bits = (config & 0xc) >> 2; uart_config.parity = (config & 0x3); From dcdda0cdd36c8974043049f736b65c3acae788bc Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Wed, 28 Aug 2024 06:56:15 +0000 Subject: [PATCH 5/5] ci(pre-commit): Apply automatic fixes --- cores/esp32/esp32-hal-uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cores/esp32/esp32-hal-uart.c b/cores/esp32/esp32-hal-uart.c index fa5f8c83150..c2065e806c4 100644 --- a/cores/esp32/esp32-hal-uart.c +++ b/cores/esp32/esp32-hal-uart.c @@ -498,7 +498,7 @@ uart_t *uartBegin( } uart_config_t uart_config; memset(&uart_config, 0, sizeof(uart_config_t)); - uart_config.flags.backup_before_sleep = false; // new flag from IDF v5.3 + uart_config.flags.backup_before_sleep = false; // new flag from IDF v5.3 uart_config.data_bits = (config & 0xc) >> 2; uart_config.parity = (config & 0x3); uart_config.stop_bits = (config & 0x30) >> 4;