@@ -506,18 +506,18 @@ uart_t *uartBegin(
506
506
// there is an issue when returning from light sleep with the C6 and H2: the uart baud rate is not restored
507
507
// therefore, uart clock source will set to XTAL for all SoC that support it. This fix solves the C6|H2 issue.
508
508
#if SOC_UART_SUPPORT_XTAL_CLK
509
- uart_config .source_clk = UART_SCLK_XTAL ; // valid for C2, S3, C3, C6, H2 and P4
509
+ uart_config .source_clk = UART_SCLK_XTAL ; // valid for C2, S3, C3, C6, H2 and P4
510
510
#elif SOC_UART_SUPPORT_REF_TICK
511
511
if (baudrate <= 1000000 ) {
512
- uart_config .source_clk = UART_SCLK_REF_TICK ; // valid for ESP32, S2 - MAX supported baud rate is 1MHz
512
+ uart_config .source_clk = UART_SCLK_REF_TICK ; // valid for ESP32, S2 - MAX supported baud rate is 1MHz
513
513
} else {
514
- uart_config .source_clk = UART_SCLK_APB ; // baudrate may change with the APB Frequency!
514
+ uart_config .source_clk = UART_SCLK_APB ; // baudrate may change with the APB Frequency!
515
515
}
516
516
#else
517
517
// Default CLK Source: CLK_APB for ESP32|S2|S3|C3 -- CLK_PLL_F40M for C2 -- CLK_PLL_F48M for H2 -- CLK_PLL_F80M for C6
518
- uart_config .source_clk = UART_SCLK_DEFAULT ; // baudrate may change with the APB Frequency!
518
+ uart_config .source_clk = UART_SCLK_DEFAULT ; // baudrate may change with the APB Frequency!
519
519
#endif
520
-
520
+
521
521
UART_MUTEX_LOCK ();
522
522
bool retCode = ESP_OK == uart_driver_install (uart_nr , rx_buffer_size , tx_buffer_size , 20 , & (uart -> uart_event_queue ), 0 );
523
523
@@ -808,7 +808,7 @@ uint32_t uartGetBaudRate(uart_t *uart) {
808
808
UART_MUTEX_LOCK ();
809
809
if (uart_get_baudrate (uart -> num , & baud_rate ) != ESP_OK ) {
810
810
log_e ("Getting UART%d baud rate has failed." , uart -> num );
811
- baud_rate = (uint32_t ) -1 ; // return value when failed
811
+ baud_rate = (uint32_t )-1 ; // return value when failed
812
812
}
813
813
UART_MUTEX_UNLOCK ();
814
814
return baud_rate ;
0 commit comments