Skip to content

Commit

Permalink
fix(uart): sleep retention (#10248)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
SuGlider and pre-commit-ci-lite[bot] authored Aug 28, 2024
1 parent 0a8888d commit 4c4906f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cores/esp32/esp32-hal-uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,8 @@ 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));
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;
Expand Down

0 comments on commit 4c4906f

Please sign in to comment.