소스 검색

change: 放开uart波特率限制,支持任意波特率,但非标波特率的误码率没法保证

Wendal Chen 3 년 전
부모
커밋
1a22ac4714
1개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 5 5
      platform/drivers/uart/wm_uart.c

+ 5 - 5
platform/drivers/uart/wm_uart.c

@@ -154,11 +154,11 @@ static int tls_uart_set_baud_rate_inside(struct tls_uart_port *port, u32 baudrat
 	u32 apbclk;
 	tls_sys_clk sysclk;
 
-    index = tls_uart_check_baudrate(baudrate);
-    if (index < 0)
-    {
-        return WM_FAILED;
-    }
+    // index = tls_uart_check_baudrate(baudrate);
+    // if (index < 0)
+    // {
+    //     return WM_FAILED;
+    // }
     tls_sys_clk_get(&sysclk);
 	apbclk = sysclk.apbclk * 1000000;
     value = (apbclk / (16 * baudrate) - 1) |