Skip to content

Commit d2100bb

Browse files
authored
feat(uart): adds memset to make structure empty
1 parent 66c9ddb commit d2100bb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: cores/esp32/esp32-hal-uart.c

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

0 commit comments

Comments
 (0)