diff --git a/en/peripherals/machine.UART.md b/en/peripherals/machine.UART.md index c8c714f6f62bc421b8449e049c72dc59d045aa03..dff0cc2fcd59b49f5c37beb413e2b74e07ba8524 100644 --- a/en/peripherals/machine.UART.md +++ b/en/peripherals/machine.UART.md @@ -23,7 +23,7 @@ This class transmits data through the UART. -
class machine.UART(UART.UARTn, baudrate, databits, parity, stopbits, flowctl)
Parametric Description:
@@ -39,6 +39,22 @@ This class transmits data through the UART.class machine.UART(UART.UARTn, baudrate, databits, parity, stopbits, flowctl)
+
+Parametric Description:
+UARTn
- UART number, int type, UARTn description is as follows:UART0
- DEBUG PORT UART1
- BT PORT UART2
- MAIN PORT UART3
- USB CDC PORT
baudratec
- Baud rate, int type, supports common baud rates such as4800
、9600
、19200
、38400
、57600
、115200
、230400
.
databits
- Data bits [8], int type.
parity
- Parity (0-None, 1-even, 2-odd), int type.
stopbits
- Stop bit [1 ~ 2], int type.
flowctl
- Hardware control flow (0-FC_NONE, 1-FC_HW), int type.
class machine.UART(UART.UARTn, baudrate, databits, parity, stopbits, flowctl, [group])
diff --git a/zh/peripherals/machine.UART.md b/zh/peripherals/machine.UART.md
index 7244c3603c262326c66854e3c52b21215e600719..29b025638cde24d8d6d3e395b1158670cbfed17b 100644
--- a/zh/peripherals/machine.UART.md
+++ b/zh/peripherals/machine.UART.md
@@ -55,7 +55,7 @@
class machine.UART(UART.UARTn, baudrate, databits, parity, stopbits, flowctl)
参数描述:
@@ -71,6 +71,22 @@class machine.UART(UART.UARTn, baudrate, databits, parity, stopbits, flowctl)
+
+参数描述:
+UARTn
- UART编号,int类型,UARTn说明如下:UART0
- DEBUG PORT UART1
- BT PORT UART2
- MAIN PORT UART3
- USB CDC PORT
baudratec
- 波特率,int类型,支持常用波特率,如4800
、9600
、19200
、38400
、57600
、115200
、230400
等;
databits
- 数据位[8],int类型。
parity
- 奇偶校验(0 – NONE,1 – EVEN,2 – ODD),int类型。
stopbits
- 停止位[1 ~ 2],int类型。
flowctl
- 硬件控制流(0 – FC_NONE, 1 – FC_HW),int类型。
class machine.UART(UART.UARTn, baudrate, databits, parity, stopbits, flowctl, [group])