Skip to content

Commit 4c4906f

Browse files
fix(uart): sleep retention (#10248)
* fix(uart): sleep retention sets new flag from IDF 5.3 that causes error with Serial.begin(115200). * fix(typo): typo and commentaries * feat(uart): adds memset to make structure empty * fix(uart): missing parentesis - typo * ci(pre-commit): Apply automatic fixes --------- Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
1 parent 0a8888d commit 4c4906f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cores/esp32/esp32-hal-uart.c

+2
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,8 @@ uart_t *uartBegin(
497497
log_v("UART%d not installed. Starting installation", uart_nr);
498498
}
499499
uart_config_t uart_config;
500+
memset(&uart_config, 0, sizeof(uart_config_t));
501+
uart_config.flags.backup_before_sleep = false; // new flag from IDF v5.3
500502
uart_config.data_bits = (config & 0xc) >> 2;
501503
uart_config.parity = (config & 0x3);
502504
uart_config.stop_bits = (config & 0x30) >> 4;

0 commit comments

Comments
 (0)