@@ -506,18 +506,18 @@ uart_t *uartBegin(
506506 // there is an issue when returning from light sleep with the C6 and H2: the uart baud rate is not restored
507507 // therefore, uart clock source will set to XTAL for all SoC that support it. This fix solves the C6|H2 issue.
508508#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
510510#elif SOC_UART_SUPPORT_REF_TICK
511511 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
513513 } 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!
515515 }
516516#else
517517 // 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!
519519#endif
520-
520+
521521 UART_MUTEX_LOCK ();
522522 bool retCode = ESP_OK == uart_driver_install (uart_nr , rx_buffer_size , tx_buffer_size , 20 , & (uart -> uart_event_queue ), 0 );
523523
@@ -808,7 +808,7 @@ uint32_t uartGetBaudRate(uart_t *uart) {
808808 UART_MUTEX_LOCK ();
809809 if (uart_get_baudrate (uart -> num , & baud_rate ) != ESP_OK ) {
810810 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
812812 }
813813 UART_MUTEX_UNLOCK ();
814814 return baud_rate ;
0 commit comments