From a2e718c1c51940459e07e0a88658ded4afc67650 Mon Sep 17 00:00:00 2001 From: "joey.zhou" <2775152163@qq.com> Date: Tue, 18 Mar 2025 10:45:22 +0800 Subject: [PATCH 1/4] uart_adc --- en/peripherals/machine.UART.md | 1624 ++++++++++---------------------- en/peripherals/misc.ADC.md | 1 - zh/peripherals/machine.UART.md | 1476 +++++++++-------------------- zh/peripherals/misc.ADC.md | 1 - 4 files changed, 984 insertions(+), 2118 deletions(-) diff --git a/en/peripherals/machine.UART.md b/en/peripherals/machine.UART.md index 48631c4..bfa335d 100644 --- a/en/peripherals/machine.UART.md +++ b/en/peripherals/machine.UART.md @@ -7,481 +7,53 @@ This class transmits data through the UART. ### `machine.UART`
-
+
class machine.UART(UART.UARTn, baudrate, databits, parity, stopbits, flowctl)
 
-

Parametric Description

+

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
    UART4 - STDOUT PORT

    +
  • UARTn - UART number, int type, UARTn description is as follows:
    UART0 - DEBUG PORT
    UART1 - BT PORT
    UART2 - MAIN PORT
    UART3 - USB CDC PORT
    UART4 - STDOUT PORT

  • -
  • baudratec - Baud rate, int type, supports common baud rates such as48009600192003840057600115200230400.
    /EC600U series support 2400, 4800, 9600, 14400, 19200, 28800, 33600, 38400, 57600, 115200, 230400, 460800, 921600, 1000000.

  • -
  • databits - Data bit [5 ~ 8], int type, EC600U only supports 8 bits.

  • -
  • 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.

    +
  • baudratec - Baud rate, int type, supports common baud rates such as48009600192003840057600115200230400.

  • +
  • databits - The data bit only supports 8 bits, 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)
 
-

Parametric Description

+

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
    UART4 - STDOUT PORT

    +
  • 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 as48009600192003840057600115200230400.
    EC200U系列支持2400、4800、9600、14400、19200、28800、33600、38400、57600、115200、230400、460800、921600、1000000。

  • -
  • databits - Data bits [5 ~ 8], int type, only 8 bits supported.

  • -
  • 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.

    +
  • baudratec - Baud rate, int type, supports common baud rates such as48009600192003840057600115200230400.

  • +
  • databits - Data bits [5-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)
 
-

Parametric Description

+

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

    +
  • UARTn - UART number, int type, UARTn description is as follows:
    UART0 - DEBUG PORT
    UART1 - BT PORT
    UART2 - MAIN PORT
    UART3 - USB CDC PORT (BG95M3 is not supported.)

  • -
  • baudratec - Baud rate, int type, supports common baud rates such as48009600192003840057600115200230400.

  • -
  • databits - Data bits [5 ~ 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.

    +
  • baudratec - Baud rate, int type, supports common baud rates such as48009600192003840057600115200230400.

  • +
  • databits - Data bits [5-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)
-
-

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 as48009600192003840057600115200230400.

  • -
  • databits - Data bits [5 ~ 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)
-
-

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 as48009600192003840057600115200230400.

  • -
  • databits - Data bits [5 ~ 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)
-
-

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 as48009600192003840057600115200230400.

  • -
  • databits - Data bits [5 ~ 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)
-
-

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 as48009600192003840057600115200230400.

  • -
  • databits - Data bits [5 ~ 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)
-
-

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 as48009600192003840057600115200230400.

  • -
  • databits - Data bits [5 ~ 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)
-
-

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 as48009600192003840057600115200230400.

  • -
  • databits - Data bits [5 ~ 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)
-
-

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 (不支持BG95M3)

    -
  • -
  • baudratec - Baud rate, int type, supports common baud rates such as48009600192003840057600115200230400.

  • -
  • databits - Data bits [5 ~ 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)
-
-

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 as48009600192003840057600115200230400.

  • -
  • databits - Data bits [5 ~ 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)
-
-

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
    UART4 - STDOUT PORT

    -
  • -
  • baudratec - Baud rate, int type, supports common baud rates such as48009600192003840057600115200230400.
    EG915U series support 2400, 4800, 9600, 14400, 19200, 28800, 33600, 38400, 57600, 115200, 230400, 460800, 921600, 1000000.

  • -
  • databits - Data bits [5 ~ 8], int type, only 8 bits supported.

  • -
  • 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)
-
-

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 as48009600192003840057600115200230400.

  • -
  • databits - Data bits [5 ~ 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)
-
-

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 as48009600192003840057600115200230400.

  • -
  • databits - Data bits [5 ~ 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)
-
-

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 as48009600192003840057600115200230400.

  • -
  • databits - Data bits [5 ~ 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)
-
-

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 as48009600192003840057600115200230400.

  • -
  • databits - Data bits [5 ~ 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)
-
-

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 as48009600192003840057600115200230400.

  • -
  • databits - Data bits [5 ~ 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)
-
-

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 as48009600192003840057600115200230400.

  • -
  • databits - Data bits [5 ~ 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)
-
-

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 as48009600192003840057600115200230400.

  • -
  • databits - Data bits [5 ~ 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)
-
-

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 as48009600192003840057600115200230400.
    EG912U series support 2400, 4800, 9600, 14400, 19200, 28800, 33600, 38400, 57600, 115200, 230400, 460800, 921600, 1000000.

    -
  • databits - Data bits [5 ~ 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)
-
-

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 as48009600192003840057600115200230400.

  • -
  • databits - Data bits [5 ~ 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)
-
-

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 as48009600192003840057600115200230400.

    -
  • databits - Data bits [5 ~ 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)
-
-

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 as48009600192003840057600115200230400.

  • -
  • databits - Data bits [5 ~ 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)
-
-

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 as48009600192003840057600115200230400.

  • -
  • databits - Data bits [5 ~ 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)
-
-

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 as48009600192003840057600115200230400.

  • -
  • databits - Data bits [5 ~ 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)
-
-

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 as48009600192003840057600115200230400.

  • -
  • databits - Data bits [5 ~ 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)
-
-

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 as48009600192003840057600115200230400.

  • -
  • databits - Data bits [5 ~ 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)
-
-

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 as48009600192003840057600115200230400.

  • -
  • databits - Data bits [5 ~ 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)
-
-

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
    UART4 - STDOUT PORT

    -
  • -
  • baudratec - Baud rate, int type, supports common baud rates such as48009600192003840057600115200230400.

  • -
  • databits - Data bits [5 ~ 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)
-
-

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 as48009600192003840057600115200230400.

  • -
  • databits - Data bits [5 ~ 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.

  • -
-
**UART Pin Correspondences:** @@ -489,954 +61,1225 @@ This class transmits data through the UART.
- + + - + - - + + + - + + - + - - + + +
UART numberuart number TX pin RX pin RTS pin CTS pinAttention
UART1uart1 pin124 pin123
UART2uart2 pin32 pin31 pin34 pin33
UART4uart4 pin103 pin104
- + + - + - - + + + - + + - + - - + + +
UART numberuart number TX pin RX pin RTS pin CTS pinAttention
UART1uart1 pin138 pin137
UART2uart2 pin67 pin68 pin65 pin64
UART4uart4 pin82(EC200UXXAA is not supported.) pin81
- + + + - + - + + + - + - + + + - + - + + +
UART numberuart number TX pin RX pinRTS pinCTS pin Attention
UART0(The use of other Uarts is recommended.)uart0(The use of other Uarts is recommended.) pin12 pin11
UART1uart1 pin63(EC200ACN_LA: pin26) pin66(EC200ACN_LA: pin27) EC200ACN_LA module uart1pin is different from other models.
UART2uart2 pin67 pin68EC200ACN LA module UART1pin is different from other models.
- + + + - + - + + + - + - + + + - + - + + +
UART numberuart number TX pin RX pinRTS pinCTS pin Attention
UART0(The use of other Uarts is recommended.)uart0(The use of other Uarts is recommended.) pin12 pin11
UART1uart1 pin63(EC200ACN_LA: pin26) pin66(EC200ACN_LA: pin27)EC200ACN LA module UART1pin is different from other models. EC200ACN_LA module uart1pin is different from other models.
UART2uart2 pin67 pin68
- + + + + - + + + + - + + + + - + + + +
UART numberuart number TX pin RX pinRTS pinCTS pinAttention
UART0uart0 pin71 pin72
UART1uart1 pin3 pin2
UART2uart2 pin32 pin31
- + + + + - + + + + - + + + + - + + + +
UART numberuart number TX pin RX pinRTS pinCTS pinAttention
UART0uart0 pin71 pin72
UART1uart1 pin3 pin2
UART2uart2 pin32 pin31
- + + + + - + + + + - + + + + - + + + +
UART numberuart number TX pin RX pinRTS pinCTS pinAttention
UART0uart0 pin21 pin20
UART1uart1 pin27 pin28
UART2uart2 pin50 pin49
- + + + + - + + + + - + + + + - + + + +
UART numberuart number TX pin RX pinRTS pinCTS pinAttention
UART0uart0 pin39 pin38
UART1uart1 pin50 pin51
UART2uart2 pin18 pin17
- + + + + - + + + +
UART numberuart number TX pin RX pinRTS pinCTS pinAttention
UART1uart1 pin29 pin28
- +
- + + + + - + + + + - + + + + - + + + + - + + + +
UART numberuart number TX pin RX pinRTS pinCTS pinAttention
UART0uart0 pin23 pin22
UART1uart1 pin27 pin28
UART2uart2 pin64 pin65
UART4uart4 pin35 pin34
- + + + + - + + + + - + + + + - + + + + - + + + +
UART numberuart number TX pin RX pinRTS pinCTS pinAttention
UART0uart0 pin71 pin72
UART1(flowctl = 0)uart1(flowctl = 0) pin3 pin2
UART1(flowctl = 1)uart1(flowctl = 1) pin33 pin34
UART2uart2 pin32 pin31
- + + - + - - + + + - + + - + - - + + +
UART numberuart number TX pin RX pin RTS pin CTS pinAttention
UART1uart1 pin27 pin28
UART2uart2 pin35 pin34 pin37 pin36
UART4uart4 pin19 pin18
- + + + - + - + + + - + - + + + - + - + + + - + - + + + - + - + + +
UART numberuart number TX pin RX pinRTS pinCTS pin Attention
UART0uart0 pin39 pin38
UART1(flowctl = 0)uart1(flowctl = 0) pin50 pin51UART1 is not available for EC800MCNGA, CNGB, CNGD/ EG810MCNGA, and CNGB modules.
UART1(flowctl = 1)uart1(flowctl = 1) pin22 pin23 Uart1 is not available for EC800MCNGA, CNGB, CNGD/ EG810MCNGA, and CNGB modules.
UART2uart2 pin18 pin17
UART4uart4 pin29 pin28
- + + + - + - + + + - + - + + + - + - + + + - + - + + + - + - + + +
UART numberuart number TX pin RX pinRTS pinCTS pin Attention
UART0uart0 pin39 pin38
UART1(flowctl = 0)uart1(flowctl = 0) pin50 pin51UART1 is not available for EC800MCNGA, CNGB, CNGD/ EG810MCNGA, and CNGB modules.
UART1(flowctl = 1)uart1(flowctl = 1) pin22 pin23 Uart1 is not available for EC800MCNGA, CNGB, CNGD/ EG810MCNGA, and CNGB modules.
UART2uart2 pin18 pin17
UART4uart4 pin29 pin28
- + + + + - + + + + - + + + + - + + + + - + + + +
UART numberuart number TX pin RX pinRTS pinCTS pinAttention
UART0uart0 pin23 pin22
UART1(flowctl = 0)uart1(flowctl = 0) pin27 pin28
UART1(flowctl = 1)uart1(flowctl = 1) pin36 pin37
UART2uart2 pin35 pin34
- + + + + - + + + + - + + + + - + + + +
UART numberuart number TX pin RX pinRTS pinCTS pinAttention
UART0uart0 pin71 pin72
UART1(EC600ECN LE&LQ is not available.)uart1 pin70 pin69 EC600ECN_LE&LQ is not available.
UART2uart2 pin32 pin31
- + + + + - + + + + - + + + + - + + + +
UART numberuart number TX pin RX pinRTS pinCTS pinAttention
UART0uart0 pin39 pin38
UART1uart1 pin29 pin28
UART2uart2 pin18 pin17
- + + - + - - + + + - + - - + + + - + - - + + + - + - - + + + - + - - + + +
UART numberuart number TX pin RX pin RTS pin CTS pinAttention
UART0uart0 pin124 pin123
UART2uart2 pin32 pin31 pin34 pin33pin34pin33
UART4uart4 pin116 pin9
UART5uart5 pin125 pin126
UART6uart6 pin106 pin105
- + + + + - + + + + - + + + + - + + + + - + + + +
UART numberuart number TX pin RX pinRTS pinCTS pinAttention
UART1uart1 pin29 pin28
UART2uart2 pin18 pin17
UART5uart5 pin23 pin22
UART6uart6 pin86 pin83
- + + - + - - + + + - + + - + - - + + +
UART numberuart number TX pin RX pin RTS pin CTS pinAttention
UART1uart1 pin27 pin28
UART2uart2 pin35 pin34 pin37 pin36
UART4(EG912UGL AA is not available.)uart4 pin19 pin18 EG912UGL_AA is not available.
- + + + + - + + + + - + + + + - + + + + - + + + +
UART numberuart number TX pin RX pinRTS pinCTS pinAttention
UART0uart0 pin71 pin72
UART1(flowctl = 0)uart1(flowctl = 0) pin3 pin2
UART1(flowctl = 1)uart1(flowctl = 1) pin33 pin34
UART2uart2 pin32 pin31
- + + + - + - + + + - + + + - + + + - + - + + +
UART numberuart number TX pin RX pinRTS pinCTS pin Attention
UART0uart0 pin39 pin38
UART1(flowctl = 0)uart1(flowctl = 0) pin50 pin51 EG800KCN is not available.
UART1(flowctl = 1)uart1(flowctl = 1) pin22 pin23 EG800KCN is not available.
UART2uart2 pin18 pin17
- + + + - + - + + + - + + + - + + + - + - + + +
UART numberuart number TX pin RX pinRTS pinCTS pin Attention
UART0uart0 pin39 pin38
UART1(flowctl = 0)uart1(flowctl = 0) pin50 pin51 EG800KCN is not available.
UART1(flowctl = 1)uart1(flowctl = 1) pin22 pin23 EG800KCN is not available.
UART2uart2 pin18 pin17
- + + - + - - + + + - + - - + + + - + - - + + + - + - - + + +
UART numberuart number TX pin RX pin RTS pin CTS pinAttention
UART0uart0 pin39 pin38
UART1uart1 pin22 pin23
UART2uart2 pin18 pin17 pin23 pin22pin23pin22
UART3uart3 pin29 pin28
- + + + + - + + + + - + + + +
UART numberuart number TX pin RX pinRTS pinCTS pinAttention
UART1uart0 pin27 pin26
UART2uart1 pin20 pin19
- + + + + - + + + + - + + + +
UART numberuart number TX pin RX pinRTS pinCTS pinAttention
UART1uart1 pin35 pin34
UART2uart2 pin28 pin27
- + + + + - + + + +
UART numberuart number TX pin RX pinRTS pinCTS pinAttention
UART0uart0 pin21 pin22
- + + + + - + + + +
UART numberuart number TX pin RX pinRTS pinCTS pinAttention
UART0uart0 pin22 pin21
- + + - + - - + + + - + - - + + + - + + - + - - + + +
UART numberuart number TX pin RX pin RTS pin CTS pinAttention
UART0uart0 pin23 pin22
UART1uart1 pin27 pin28
UART2uart2 pin35 pin34 pin36 pin37
UART4(EG915NEU_AG unsupported.)uart4 pin36 pin37 Not supported by EG915NEU_AG.
- + + + + - + + + + - + + + + - + + + +
UART numberuart number TX pin RX pinRTS pinCTS pinAttention
UART0uart0 pin39 pin38
UART1uart1 pin29 pin28
UART2uart2 pin18 pin17
-
-
-

To use UART4 in BG95 series, you need to call modem.main_uart_enable_set(1) to enable UART4, and restart it as follows

+
+

To use UART4, you need to call modem.main_uart_enable_set(1) to enable UART4, and restart it as follows

    -
    import modem
    modem.main_uart_enable_get()
    #Get the Main UART enable status 1-enabled, 0-not enabled
    modem.main_uart_enable_set(1)
    #Set the Main_UART enable state 1- enabled, 0- not enabled, restart to take effect +
    import modem
    +# Get Main UART enabled status 1-enabled, 0-not enabled
    +modem.main_uart_enable_get()
    +# Set Main_UART enable state 1- enabled, 0- Not enabled, restart to take effect
    +modem.main_uart_enable_set(1)
     
-
-

When flowctl = 1, uart1 of EC600M only maps uart1 to different pins and does not turn on the flow control function.

+
+

When flowctl = 1, uart1 only maps uart1 to different pins and does not turn on the flow control function.

-
-

When flowctl = 1, uart1 of EC800M only maps uart1 to different pins, and the flow control function is not turned on.

-
- -
-

When flowctl = 1, uart1 of EG810M only maps uart1 to different pins and does not turn on the flow control function.

-
- -
-

When flowctl = 1, uart1 of EG912N only maps uart1 to different pins and does not turn on the flow control function.

-
- -
-

When flowctl = 1, uart1 of EC600K only maps uart1 to different pins and does not turn on the flow control function.

-
- -
-

The uart1 of EC800K only maps uart1 to different pins when flowctl = 1, and the flow control function is not turned on.

-
-

After the FCM360W UART2 is initialized, the interaction port will not be used. You need to execute uart2.close() in the code or restart the module to continue to use the interaction port.

+

UART2 is initialized after the interaction port will not be used, you need to execute uart2.close() in the code or restart the module to continue to use the interaction port.

-

FCM362K UART1 is initialized after the interaction port will not be used, you need to execute uart1.close() in the code or restart the module to continue to use the interaction port.

+

UART1 is initialized after the interaction port will not be used, you need to execute uart1.close() in the code or restart the module to continue to use the interaction port.

@@ -1516,456 +1359,23 @@ This method disables the UART. `-1` - Failed execution
-
-### `uart.control_485` -
uart.control_485(UART.GPIOn, direction)
-
-

This method is used to control the 485 communication direction, and the specified GPIO is pulled up and down before and after the serial port sends data to indicate the 485 communication direction.

-

Parametric Description

-
    -
  • GPIOn - GPIO Pin number to control, refer to pin definition in [Pin module](machine.Pin.md), int type.

    -
  • -
  • direction - Pin level change, int type, described as follows:
    1It indicates that the pin level change is: the serial port is pulled up by low before sending data, and then pulled down by high after sending data
    0It indicates that the pin level change is: the serial port is pulled down by high before sending data, and then pulled up by low after sending data

    -
  • -
-

Return value Description:

-

Returns an integer value on success0,Returns an integer value on failure-1

-

Example:

-
from machine import UART
uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
uart1.control_485(UART.GPIO24, 1) -
- -
-### `uart.control_485` -
uart.control_485(UART.GPIOn, direction)
-
-

This method is used to control the 485 communication direction, and the specified GPIO is pulled up and down before and after the serial port sends data to indicate the 485 communication direction.

-

Parametric Description

-
    -
  • GPIOn - GPIO Pin number to control, refer to pin definition in [Pin module](machine.Pin.md), int type.

    -
  • -
  • direction - Pin level change, int type, described as follows:
    1It indicates that the pin level change is: the serial port is pulled up by low before sending data, and then pulled down by high after sending data
    0It indicates that the pin level change is: the serial port is pulled down by high before sending data, and then pulled up by low after sending data

    -
  • -
-

Return value Description:

-

Returns an integer value on success0,Returns an integer value on failure-1

-

Example:

-
from machine import UART
uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
uart1.control_485(UART.GPIO24, 1) -
- -
-### `uart.control_485` -
uart.control_485(UART.GPIOn, direction)
-
-

This method is used to control the 485 communication direction, and the specified GPIO is pulled up and down before and after the serial port sends data to indicate the 485 communication direction.

-

Parametric Description

-
    -
  • GPIOn - GPIO Pin number to control, refer to pin definition in [Pin module](machine.Pin.md), int type.

    -
  • -
  • direction - Pin level change, int type, described as follows:
    1It indicates that the pin level change is: the serial port is pulled up by low before sending data, and then pulled down by high after sending data
    0It indicates that the pin level change is: the serial port is pulled down by high before sending data, and then pulled up by low after sending data

    -
  • -
-

Return value Description:

-

Returns an integer value on success0,Returns an integer value on failure-1

-

Example:

-
from machine import UART
uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
uart1.control_485(UART.GPIO24, 1) -
- -
-### `uart.control_485` -
uart.control_485(UART.GPIOn, direction)
-
-

This method is used to control the 485 communication direction, and the specified GPIO is pulled up and down before and after the serial port sends data to indicate the 485 communication direction.

-

Parametric Description

-
    -
  • GPIOn - GPIO Pin number to control, refer to pin definition in [Pin module](machine.Pin.md), int type.

    -
  • -
  • direction - Pin level change, int type, described as follows:
    1It indicates that the pin level change is: the serial port is pulled up by low before sending data, and then pulled down by high after sending data
    0It indicates that the pin level change is: the serial port is pulled down by high before sending data, and then pulled up by low after sending data

    -
  • -
-

Return value Description:

-

Returns an integer value on success0,Returns an integer value on failure-1

-

Example:

-
from machine import UART
uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
uart1.control_485(UART.GPIO24, 1) -
- -
-### `uart.control_485` -
uart.control_485(UART.GPIOn, direction)
-
-

This method is used to control the 485 communication direction, and the specified GPIO is pulled up and down before and after the serial port sends data to indicate the 485 communication direction.

-

Parametric Description

-
    -
  • GPIOn - GPIO Pin number to control, refer to pin definition in [Pin module](machine.Pin.md), int type.

    -
  • -
  • direction - Pin level change, int type, described as follows:
    1It indicates that the pin level change is: the serial port is pulled up by low before sending data, and then pulled down by high after sending data
    0It indicates that the pin level change is: the serial port is pulled down by high before sending data, and then pulled up by low after sending data

    -
  • -
-

Return value Description:

-

Returns an integer value on success0,Returns an integer value on failure-1

-

Example:

-
from machine import UART
uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
uart1.control_485(UART.GPIO24, 1) -
- -
-### `uart.control_485` -
uart.control_485(UART.GPIOn, direction)
-
-

This method is used to control the 485 communication direction, and the specified GPIO is pulled up and down before and after the serial port sends data to indicate the 485 communication direction.

-

Parametric Description

-
    -
  • GPIOn - GPIO Pin number to control, refer to pin definition in [Pin module](machine.Pin.md), int type.

    -
  • -
  • direction - Pin level change, int type, described as follows:
    1It indicates that the pin level change is: the serial port is pulled up by low before sending data, and then pulled down by high after sending data
    0It indicates that the pin level change is: the serial port is pulled down by high before sending data, and then pulled up by low after sending data

    -
  • -
-

Return value Description:

-

Returns an integer value on success0,Returns an integer value on failure-1

-

Example:

-
from machine import UART
uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
uart1.control_485(UART.GPIO24, 1) -
- -
-### `uart.control_485` -
uart.control_485(UART.GPIOn, direction)
-
-

This method is used to control the 485 communication direction, and the specified GPIO is pulled up and down before and after the serial port sends data to indicate the 485 communication direction.

-

Parametric Description

-
    -
  • GPIOn - GPIO Pin number to control, refer to pin definition in [Pin module](machine.Pin.md), int type.

    -
  • -
  • direction - Pin level change, int type, described as follows:
    1It indicates that the pin level change is: the serial port is pulled up by low before sending data, and then pulled down by high after sending data
    0It indicates that the pin level change is: the serial port is pulled down by high before sending data, and then pulled up by low after sending data

    -
  • -
-

Return value Description:

-

Returns an integer value on success0,Returns an integer value on failure-1

-

Example:

-
from machine import UART
uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
uart1.control_485(UART.GPIO24, 1) -
- -
-### `uart.control_485` -
uart.control_485(UART.GPIOn, direction)
-
-

This method is used to control the 485 communication direction, and the specified GPIO is pulled up and down before and after the serial port sends data to indicate the 485 communication direction.

-

Parametric Description

-
    -
  • GPIOn - GPIO Pin number to control, refer to pin definition in [Pin module](machine.Pin.md), int type.

    -
  • -
  • direction - Pin level change, int type, described as follows:
    1It indicates that the pin level change is: the serial port is pulled up by low before sending data, and then pulled down by high after sending data
    0It indicates that the pin level change is: the serial port is pulled down by high before sending data, and then pulled up by low after sending data

    -
  • -
-

Return value Description:

-

Returns an integer value on success0,Returns an integer value on failure-1

-

Example:

-
from machine import UART
uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
uart1.control_485(UART.GPIO24, 1) -
- -
-### `uart.control_485` -
uart.control_485(UART.GPIOn, direction)
-
-

This method is used to control the 485 communication direction, and the specified GPIO is pulled up and down before and after the serial port sends data to indicate the 485 communication direction.

-

Parametric Description

-
    -
  • GPIOn - GPIO Pin number to control, refer to pin definition in [Pin module](machine.Pin.md), int type.

    -
  • -
  • direction - Pin level change, int type, described as follows:
    1It indicates that the pin level change is: the serial port is pulled up by low before sending data, and then pulled down by high after sending data
    0It indicates that the pin level change is: the serial port is pulled down by high before sending data, and then pulled up by low after sending data

    -
  • -
-

Return value Description:

-

Returns an integer value on success0,Returns an integer value on failure-1

-

Example:

-
from machine import UART
uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
uart1.control_485(UART.GPIO24, 1) -
- - -
-### `uart.control_485` -
uart.control_485(UART.GPIOn, direction)
-
-

This method is used to control the 485 communication direction, and the specified GPIO is pulled up and down before and after the serial port sends data to indicate the 485 communication direction.

-

Parametric Description

-
    -
  • GPIOn - GPIO Pin number to control, refer to pin definition in [Pin module](machine.Pin.md), int type.

    -
  • -
  • direction - Pin level change, int type, described as follows:
    1It indicates that the pin level change is: the serial port is pulled up by low before sending data, and then pulled down by high after sending data
    0It indicates that the pin level change is: the serial port is pulled down by high before sending data, and then pulled up by low after sending data

    -
  • -
-

Return value Description:

-

Returns an integer value on success0,Returns an integer value on failure-1

-

Example:

-
from machine import UART
uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
uart1.control_485(UART.GPIO24, 1) -
- -
-### `uart.control_485` -
uart.control_485(UART.GPIOn, direction)
-
-

This method is used to control the 485 communication direction, and the specified GPIO is pulled up and down before and after the serial port sends data to indicate the 485 communication direction.

-

Parametric Description

-
    -
  • GPIOn - GPIO Pin number to control, refer to pin definition in [Pin module](machine.Pin.md), int type.

    -
  • -
  • direction - Pin level change, int type, described as follows:
    1It indicates that the pin level change is: the serial port is pulled up by low before sending data, and then pulled down by high after sending data
    0It indicates that the pin level change is: the serial port is pulled down by high before sending data, and then pulled up by low after sending data

    -
  • -
-

Return value Description:

-

Returns an integer value on success0,Returns an integer value on failure-1

-

Example:

-
from machine import UART
uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
uart1.control_485(UART.GPIO24, 1) -
- -
-### `uart.control_485` -
uart.control_485(UART.GPIOn, direction)
-
-

This method is used to control the 485 communication direction, and the specified GPIO is pulled up and down before and after the serial port sends data to indicate the 485 communication direction.

-

Parametric Description

-
    -
  • GPIOn - GPIO Pin number to control, refer to pin definition in [Pin module](machine.Pin.md), int type.

    -
  • -
  • direction - Pin level change, int type, described as follows:
    1It indicates that the pin level change is: the serial port is pulled up by low before sending data, and then pulled down by high after sending data
    0It indicates that the pin level change is: the serial port is pulled down by high before sending data, and then pulled up by low after sending data

    -
  • -
-

Return value Description:

-

Returns an integer value on success0,Returns an integer value on failure-1

-

Example:

-
from machine import UART
uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
uart1.control_485(UART.GPIO24, 1) -
- -
-### `uart.control_485` -
uart.control_485(UART.GPIOn, direction)
-
-

This method is used to control the 485 communication direction, and the specified GPIO is pulled up and down before and after the serial port sends data to indicate the 485 communication direction.

-

Parametric Description

-
    -
  • GPIOn - GPIO Pin number to control, refer to pin definition in [Pin module](machine.Pin.md), int type.

    -
  • -
  • direction - Pin level change, int type, described as follows:
    1It indicates that the pin level change is: the serial port is pulled up by low before sending data, and then pulled down by high after sending data
    0It indicates that the pin level change is: the serial port is pulled down by high before sending data, and then pulled up by low after sending data

    -
  • -
-

Return value Description:

-

Returns an integer value on success0,Returns an integer value on failure-1

-

Example:

-
from machine import UART
uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
uart1.control_485(UART.GPIO24, 1) -
- -
-### `uart.control_485` -
uart.control_485(UART.GPIOn, direction)
-
-

This method is used to control the 485 communication direction, and the specified GPIO is pulled up and down before and after the serial port sends data to indicate the 485 communication direction.

-

Parametric Description

-
    -
  • GPIOn - GPIO Pin number to control, refer to pin definition in [Pin module](machine.Pin.md), int type.

    -
  • -
  • direction - Pin level change, int type, described as follows:
    1It indicates that the pin level change is: the serial port is pulled up by low before sending data, and then pulled down by high after sending data
    0It indicates that the pin level change is: the serial port is pulled down by high before sending data, and then pulled up by low after sending data

    -
  • -
-

Return value Description:

-

Returns an integer value on success0,Returns an integer value on failure-1

-

Example:

-
from machine import UART
uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
uart1.control_485(UART.GPIO24, 1) -
- -
-### `uart.control_485` -
uart.control_485(UART.GPIOn, direction)
-
-

This method is used to control the 485 communication direction, and the specified GPIO is pulled up and down before and after the serial port sends data to indicate the 485 communication direction.

-

Parametric Description

-
    -
  • GPIOn - GPIO Pin number to control, refer to pin definition in [Pin module](machine.Pin.md), int type.

    -
  • -
  • direction - Pin level change, int type, described as follows:
    1It indicates that the pin level change is: the serial port is pulled up by low before sending data, and then pulled down by high after sending data
    0It indicates that the pin level change is: the serial port is pulled down by high before sending data, and then pulled up by low after sending data

    -
  • -
-

Return value Description:

-

Returns an integer value on success0,Returns an integer value on failure-1

-

Example:

-
from machine import UART
uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
uart1.control_485(UART.GPIO24, 1) -
- -
-### `uart.control_485` -
uart.control_485(UART.GPIOn, direction)
-
-

This method is used to control the 485 communication direction, and the specified GPIO is pulled up and down before and after the serial port sends data to indicate the 485 communication direction.

-

Parametric Description

-
    -
  • GPIOn - GPIO Pin number to control, refer to pin definition in [Pin module](machine.Pin.md), int type.

    -
  • -
  • direction - Pin level change, int type, described as follows:
    1It indicates that the pin level change is: the serial port is pulled up by low before sending data, and then pulled down by high after sending data
    0It indicates that the pin level change is: the serial port is pulled down by high before sending data, and then pulled up by low after sending data

    -
  • -
-

Return value Description:

-

Returns an integer value on success0,Returns an integer value on failure-1

-

Example:

-
from machine import UART
uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
uart1.control_485(UART.GPIO24, 1) -
- -
-### `uart.control_485` -
uart.control_485(UART.GPIOn, direction)
-
-

This method is used to control the 485 communication direction, and the specified GPIO is pulled up and down before and after the serial port sends data to indicate the 485 communication direction.

-

Parametric Description

-
    -
  • GPIOn - GPIO Pin number to control, refer to pin definition in [Pin module](machine.Pin.md), int type.

    -
  • -
  • direction - Pin level change, int type, described as follows:
    1It indicates that the pin level change is: the serial port is pulled up by low before sending data, and then pulled down by high after sending data
    0It indicates that the pin level change is: the serial port is pulled down by high before sending data, and then pulled up by low after sending data

    -
  • -
-

Return value Description:

-

Returns an integer value on success0,Returns an integer value on failure-1

-

Example:

-
from machine import UART
uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
uart1.control_485(UART.GPIO24, 1) -
- -
-### `uart.control_485` -
uart.control_485(UART.GPIOn, direction)
-
-

This method is used to control the 485 communication direction, and the specified GPIO is pulled up and down before and after the serial port sends data to indicate the 485 communication direction.

-

Parametric Description

-
    -
  • GPIOn - GPIO Pin number to control, refer to pin definition in [Pin module](machine.Pin.md), int type.

    -
  • -
  • direction - Pin level change, int type, described as follows:
    1It indicates that the pin level change is: the serial port is pulled up by low before sending data, and then pulled down by high after sending data
    0It indicates that the pin level change is: the serial port is pulled down by high before sending data, and then pulled up by low after sending data

    -
  • -
-

Return value Description:

-

Returns an integer value on success0,Returns an integer value on failure-1

-

Example:

-
from machine import UART
uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
uart1.control_485(UART.GPIO24, 1) -
- -
-### `uart.control_485` +
+

uart.control_485

uart.control_485(UART.GPIOn, direction)
 

This method is used to control the 485 communication direction, and the specified GPIO is pulled up and down before and after the serial port sends data to indicate the 485 communication direction.

-

Parametric Description

+

Parametric Description:

    -
  • GPIOn - GPIO Pin number to control, refer to pin definition in [Pin module](machine.Pin.md), int type.

    +
  • GPIOn - GPIO Pin number to control, refer to pin definition in [Pin module](machine.Pin.md), int type.

  • -
  • direction - Pin level change, int type, described as follows:
    1It indicates that the pin level change is: the serial port is pulled up by low before sending data, and then pulled down by high after sending data
    0It indicates that the pin level change is: the serial port is pulled down by high before sending data, and then pulled up by low after sending data

    +
  • direction - Pin level change, int type, described as follows:
    1It indicates that the pin level change is: the serial port is pulled up by low before sending data, and then pulled down by high after sending data
    0It indicates that the pin level change is: the serial port is pulled down by high before sending data, and then pulled up by low after sending data

Return value Description:

-

Returns an integer value on success0,Returns an integer value on failure-1

+

Returns an integer value on success0Returns an integer value on failure-1

Example:

-
from machine import UART
uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
uart1.control_485(UART.GPIO24, 1) -
- -
-### `uart.control_485` -
uart.control_485(UART.GPIOn, direction)
+
from machine import UART
uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
art1.control_485(UART.GPIO24, 1)
-

This method is used to control the 485 communication direction, and the specified GPIO is pulled up and down before and after the serial port sends data to indicate the 485 communication direction.

-

Parametric Description

-
    -
  • GPIOn - GPIO Pin number to control, refer to pin definition in [Pin module](machine.Pin.md), int type.

    -
  • -
  • direction - Pin level change, int type, described as follows:
    1It indicates that the pin level change is: the serial port is pulled up by low before sending data, and then pulled down by high after sending data
    0It indicates that the pin level change is: the serial port is pulled down by high before sending data, and then pulled up by low after sending data

    -
  • -
-

Return value Description:

-

Returns an integer value on success0,Returns an integer value on failure-1

-

Example:

-
from machine import UART
uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
uart1.control_485(UART.GPIO24, 1) -
- -
-### `uart.control_485` -
uart.control_485(UART.GPIOn, direction)
-
-

This method is used to control the 485 communication direction, and the specified GPIO is pulled up and down before and after the serial port sends data to indicate the 485 communication direction.

-

Parametric Description

-
    -
  • GPIOn - GPIO Pin number to control, refer to pin definition in [Pin module](machine.Pin.md), int type.

    -
  • -
  • direction - Pin level change, int type, described as follows:
    1It indicates that the pin level change is: the serial port is pulled up by low before sending data, and then pulled down by high after sending data
    0It indicates that the pin level change is: the serial port is pulled down by high before sending data, and then pulled up by low after sending data

    -
  • -
-

Return value Description:

-

Returns an integer value on success0,Returns an integer value on failure-1

-

Example:

-
from machine import UART
uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
uart1.control_485(UART.GPIO24, 1) -
- -
-### `uart.control_485` -
uart.control_485(UART.GPIOn, direction)
-
-

This method is used to control the 485 communication direction, and the specified GPIO is pulled up and down before and after the serial port sends data to indicate the 485 communication direction.

-

Parametric Description

-
    -
  • GPIOn - GPIO Pin number to control, refer to pin definition in [Pin module](machine.Pin.md), int type.

    -
  • -
  • direction - Pin level change, int type, described as follows:
    1It indicates that the pin level change is: the serial port is pulled up by low before sending data, and then pulled down by high after sending data
    0It indicates that the pin level change is: the serial port is pulled down by high before sending data, and then pulled up by low after sending data

    -
  • -
-

Return value Description:

-

Returns an integer value on success0,Returns an integer value on failure-1

-

Example:

-
from machine import UART
uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
uart1.control_485(UART.GPIO24, 1) -
- -
-### `uart.control_485` -
uart.control_485(UART.GPIOn, direction)
-
-

This method is used to control the 485 communication direction, and the specified GPIO is pulled up and down before and after the serial port sends data to indicate the 485 communication direction.

-

Parametric Description

-
    -
  • GPIOn - GPIO Pin number to control, refer to pin definition in [Pin module](machine.Pin.md), int type.

    -
  • -
  • direction - Pin level change, int type, described as follows:
    1It indicates that the pin level change is: the serial port is pulled up by low before sending data, and then pulled down by high after sending data
    0It indicates that the pin level change is: the serial port is pulled down by high before sending data, and then pulled up by low after sending data

    -
  • -
-

Return value Description:

-

Returns an integer value on success0,Returns an integer value on failure-1

-

Example:

-
from machine import UART
uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
uart1.control_485(UART.GPIO24, 1) -
- -
-### `uart.control_485` -
uart.control_485(UART.GPIOn, direction)
-
-

This method is used to control the 485 communication direction, and the specified GPIO is pulled up and down before and after the serial port sends data to indicate the 485 communication direction.

-

Parametric Description

-
    -
  • GPIOn - GPIO Pin number to control, refer to pin definition in [Pin module](machine.Pin.md), int type.

    -
  • -
  • direction - Pin level change, int type, described as follows:
    1It indicates that the pin level change is: the serial port is pulled up by low before sending data, and then pulled down by high after sending data
    0It indicates that the pin level change is: the serial port is pulled down by high before sending data, and then pulled up by low after sending data

    -
  • -
-

Return value Description:

-

Returns an integer value on success0,Returns an integer value on failure-1

-

Example:

-
from machine import UART
uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
uart1.control_485(UART.GPIO24, 1) -
- -
-### `uart.control_485` -
uart.control_485(UART.GPIOn, direction)
-
-

This method is used to control the 485 communication direction, and the specified GPIO is pulled up and down before and after the serial port sends data to indicate the 485 communication direction.

-

Parametric Description

-
    -
  • GPIOn - GPIO Pin number to control, refer to pin definition in [Pin module](machine.Pin.md), int type.

    -
  • -
  • direction - Pin level change, int type, described as follows:
    1It indicates that the pin level change is: the serial port is pulled up by low before sending data, and then pulled down by high after sending data
    0It indicates that the pin level change is: the serial port is pulled down by high before sending data, and then pulled up by low after sending data

    -
  • -
-

Return value Description:

-

Returns an integer value on success0,Returns an integer value on failure-1

-

Example:

-
from machine import UART
uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
uart1.control_485(UART.GPIO24, 1) -

Example:

diff --git a/en/peripherals/misc.ADC.md b/en/peripherals/misc.ADC.md index 5f96003..a208c39 100644 --- a/en/peripherals/misc.ADC.md +++ b/en/peripherals/misc.ADC.md @@ -486,7 +486,6 @@ If successful, a specified channel voltage value is returned. ADC0 Pin number2 - diff --git a/zh/peripherals/machine.UART.md b/zh/peripherals/machine.UART.md index 36e6d97..50fc1b9 100644 --- a/zh/peripherals/machine.UART.md +++ b/zh/peripherals/machine.UART.md @@ -7,95 +7,15 @@ ### `machine.UART`
-
+
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
    UART4 - STDOUT PORT

  • -
  • baudratec - 波特率,int类型,支持常用波特率,如48009600192003840057600115200230400等;
    /EC600U系列支持2400、4800、9600、14400、19200、28800、33600、38400、57600、115200、230400、460800、921600、1000000。

  • -
  • databits - 数据位[5 ~ 8],int类型,EC600U仅支持8位。

  • -
  • 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)
-
-

参数描述:

-
    -
  • UARTn - UART编号,int类型,UARTn说明如下:
    UART0 - DEBUG PORT
    UART1 - BT PORT
    UART2 - MAIN PORT
    UART3 - USB CDC PORT
    UART4 - STDOUT PORT

    -
  • -
  • baudratec - 波特率,int类型,支持常用波特率,如48009600192003840057600115200230400等;
    EC200U系列支持2400、4800、9600、14400、19200、28800、33600、38400、57600、115200、230400、460800、921600、1000000。

  • -
  • databits - 数据位[5 ~ 8],int类型,仅支持8位。

  • -
  • 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)
-
-

参数描述:

-
    -
  • UARTn - UART编号,int类型,UARTn说明如下:
    UART0 - DEBUG PORT
    UART1 - BT PORT
    UART2 - MAIN PORT
    UART3 - USB CDC PORT

    -
  • -
  • baudratec - 波特率,int类型,支持常用波特率,如48009600192003840057600115200230400等;

  • -
  • databits - 数据位[5 ~ 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)
-
-

参数描述:

-
    -
  • UARTn - UART编号,int类型,UARTn说明如下:
    UART0 - DEBUG PORT
    UART1 - BT PORT
    UART2 - MAIN PORT
    UART3 - USB CDC PORT

    -
  • -
  • baudratec - 波特率,int类型,支持常用波特率,如48009600192003840057600115200230400等;

  • -
  • databits - 数据位[5 ~ 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)
-
-

参数描述:

-
    -
  • UARTn - UART编号,int类型,UARTn说明如下:
    UART0 - DEBUG PORT
    UART1 - BT PORT
    UART2 - MAIN PORT
    UART3 - USB CDC PORT

    -
  • -
  • baudratec - 波特率,int类型,支持常用波特率,如48009600192003840057600115200230400等;

  • -
  • databits - 数据位[5 ~ 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)
-
-

参数描述:

-
    -
  • UARTn - UART编号,int类型,UARTn说明如下:
    UART0 - DEBUG PORT
    UART1 - BT PORT
    UART2 - MAIN PORT
    UART3 - USB CDC PORT

    -
  • baudratec - 波特率,int类型,支持常用波特率,如48009600192003840057600115200230400等;

  • -
  • databits - 数据位[5 ~ 8],int类型。

  • +
  • databits - 数据位仅支持8位,int类型。

  • parity - 奇偶校验(0 – NONE,1 – EVEN,2 – ODD),int类型。

  • stopbits - 停止位[1 ~ 2],int类型。

  • flowctl - 硬件控制流(0 – FC_NONE, 1 – FC_HW),int类型。

    @@ -103,12 +23,12 @@
-
+
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

    +
  • UARTn - UART编号,int类型,UARTn说明如下:
    UART0 - DEBUG PORT
    UART1 - BT PORT
    UART2 - MAIN PORT
    UART3 - USB CDC PORT
    UART4 - STDOUT PORT

  • baudratec - 波特率,int类型,支持常用波特率,如48009600192003840057600115200230400等;

  • databits - 数据位[5 ~ 8],int类型。

  • @@ -119,7 +39,7 @@
-
+
class machine.UART(UART.UARTn, baudrate, databits, parity, stopbits, flowctl)
 

参数描述:

@@ -127,7 +47,7 @@
  • UARTn - UART编号,int类型,UARTn说明如下:
    UART0 - DEBUG PORT
    UART1 - BT PORT
    UART2 - MAIN PORT
    UART3 - USB CDC PORT

  • baudratec - 波特率,int类型,支持常用波特率,如48009600192003840057600115200230400等;

  • -
  • databits - 数据位[5 ~ 8],int类型。

  • +
  • databits - 数据位仅支持8位,int类型。

  • parity - 奇偶校验(0 – NONE,1 – EVEN,2 – ODD),int类型。

  • stopbits - 停止位[1 ~ 2],int类型。

  • flowctl - 硬件控制流(0 – FC_NONE, 1 – FC_HW),int类型。

    @@ -135,7 +55,7 @@
  • -
    +
    class machine.UART(UART.UARTn, baudrate, databits, parity, stopbits, flowctl)
     

    参数描述:

    @@ -151,7 +71,7 @@
    -
    +
    class machine.UART(UART.UARTn, baudrate, databits, parity, stopbits, flowctl)
     

    参数描述:

    @@ -166,503 +86,235 @@
    - -
    -
    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类型,支持常用波特率,如48009600192003840057600115200230400等;

    • -
    • databits - 数据位[5 ~ 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)
    -
    -

    参数描述:

    -
      -
    • UARTn - UART编号,int类型,UARTn说明如下:
      UART0 - DEBUG PORT
      UART1 - BT PORT
      UART2 - MAIN PORT
      UART3 - USB CDC PORT
      UART4 - STDOUT PORT

      -
    • -
    • baudratec - 波特率,int类型,支持常用波特率,如48009600192003840057600115200230400等;
      EG915U系列支持2400、4800、9600、14400、19200、28800、33600、38400、57600、115200、230400、460800、921600、1000000。

    • -
    • databits - 数据位[5 ~ 8],int类型,仅支持8位。

    • -
    • 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)
    -
    -

    参数描述:

    -
      -
    • UARTn - UART编号,int类型,UARTn说明如下:
      UART0 - DEBUG PORT
      UART1 - BT PORT
      UART2 - MAIN PORT
      UART3 - USB CDC PORT

      -
    • -
    • baudratec - 波特率,int类型,支持常用波特率,如48009600192003840057600115200230400等;

    • -
    • databits - 数据位[5 ~ 8],int类型。

    • -
    • parity - 奇偶校验(0 – NONE,1 – EVEN,2 – ODD),int类型。

    • -
    • stopbits - 停止位[1 ~ 2],int类型。

    • -
    • flowctl - 硬件控制流(0 – FC_NONE, 1 – FC_HW),int类型。

      -
    • -
    -
    +**UART引脚对应关系 :** -
    -
    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类型,支持常用波特率,如48009600192003840057600115200230400等;

    • -
    • databits - 数据位[5 ~ 8],int类型。

    • -
    • parity - 奇偶校验(0 – NONE,1 – EVEN,2 – ODD),int类型。

    • -
    • stopbits - 停止位[1 ~ 2],int类型。

    • -
    • flowctl - 硬件控制流(0 – FC_NONE, 1 – FC_HW),int类型。

      -
    • -
    -
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    uart编号TX引脚RX引脚RTS引脚CTS引脚注意
    uart1引脚号124引脚号123
    uart2引脚号32引脚号31引脚号34引脚号33
    uart4引脚号103引脚号104
    -
    -
    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类型,支持常用波特率,如48009600192003840057600115200230400等;

    • -
    • databits - 数据位[5 ~ 8],int类型。

    • -
    • parity - 奇偶校验(0 – NONE,1 – EVEN,2 – ODD),int类型。

    • -
    • stopbits - 停止位[1 ~ 2],int类型。

    • -
    • flowctl - 硬件控制流(0 – FC_NONE, 1 – FC_HW),int类型。

      -
    • -
    -
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    uart编号TX引脚RX引脚RTS引脚CTS引脚注意
    uart1引脚号138引脚号137
    uart2引脚号67引脚号68引脚号65引脚号64
    uart4引脚号82(EC200UXXAA不支持)引脚号81
    -
    -
    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类型,支持常用波特率,如48009600192003840057600115200230400等;

    • -
    • databits - 数据位[5 ~ 8],int类型。

    • -
    • parity - 奇偶校验(0 – NONE,1 – EVEN,2 – ODD),int类型。

    • -
    • stopbits - 停止位[1 ~ 2],int类型。

    • -
    • flowctl - 硬件控制流(0 – FC_NONE, 1 – FC_HW),int类型。

      -
    • -
    -
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    uart编号TX引脚RX引脚RTS引脚CTS引脚注意
    uart0(建议使用其他uart)引脚号12引脚号11
    uart1引脚号63(EC200ACN_LA: 引脚号26)引脚号66(EC200ACN_LA: 引脚号27) EC200ACN_LA模组uart1引脚号与其他型号不同
    uart2引脚号67引脚号68
    -
    -
    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类型,支持常用波特率,如48009600192003840057600115200230400等;

    • -
    • databits - 数据位[5 ~ 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)
    -
    -

    参数描述:

    -
      -
    • UARTn - UART编号,int类型,UARTn说明如下:
      UART0 - DEBUG PORT
      UART1 - BT PORT
      UART2 - MAIN PORT
      UART3 - USB CDC PORT

      -
    • -
    • baudratec - 波特率,int类型,支持常用波特率,如48009600192003840057600115200230400等;

    • -
    • databits - 数据位[5 ~ 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)
    -
    -

    参数描述:

    -
      -
    • UARTn - UART编号,int类型,UARTn说明如下:
      UART0 - DEBUG PORT
      UART1 - BT PORT
      UART2 - MAIN PORT
      UART3 - USB CDC PORT

      -
    • -
    • baudratec - 波特率,int类型,支持常用波特率,如48009600192003840057600115200230400等;

    • -
    • databits - 数据位[5 ~ 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)
    -
    -

    参数描述:

    -
      -
    • UARTn - UART编号,int类型,UARTn说明如下:
      UART0 - DEBUG PORT
      UART1 - BT PORT
      UART2 - MAIN PORT
      UART3 - USB CDC PORT

      -
    • -
    • baudratec - 波特率,int类型,支持常用波特率,如48009600192003840057600115200230400等;
      EG912U系列支持2400、4800、9600、14400、19200、28800、33600、38400、57600、115200、230400、460800、921600、1000000。

      -
    • databits - 数据位[5 ~ 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)
    -
    -

    参数描述:

    -
      -
    • UARTn - UART编号,int类型,UARTn说明如下:
      UART0 - DEBUG PORT
      UART1 - BT PORT
      UART2 - MAIN PORT
      UART3 - USB CDC PORT

      -
    • -
    • baudratec - 波特率,int类型,支持常用波特率,如48009600192003840057600115200230400等;

    • -
    • databits - 数据位[5 ~ 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)
    -
    -

    参数描述:

    -
      -
    • UARTn - UART编号,int类型,UARTn说明如下:
      UART0 - DEBUG PORT
      UART1 - BT PORT
      UART2 - MAIN PORT
      UART3 - USB CDC PORT

      -
    • -
    • baudratec - 波特率,int类型,支持常用波特率,如48009600192003840057600115200230400等;

      -
    • databits - 数据位[5 ~ 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)
    -
    -

    参数描述:

    -
      -
    • UARTn - UART编号,int类型,UARTn说明如下:
      UART0 - DEBUG PORT
      UART1 - BT PORT
      UART2 - MAIN PORT
      UART3 - USB CDC PORT

      -
    • -
    • baudratec - 波特率,int类型,支持常用波特率,如48009600192003840057600115200230400等;

    • -
    • databits - 数据位[5 ~ 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)
    -
    -

    参数描述:

    -
      -
    • UARTn - UART编号,int类型,UARTn说明如下:
      UART0 - DEBUG PORT
      UART1 - BT PORT
      UART2 - MAIN PORT
      UART3 - USB CDC PORT

      -
    • -
    • baudratec - 波特率,int类型,支持常用波特率,如48009600192003840057600115200230400等;

    • -
    • databits - 数据位[5 ~ 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)
    -
    -

    参数描述:

    -
      -
    • UARTn - UART编号,int类型,UARTn说明如下:
      UART0 - DEBUG PORT
      UART1 - BT PORT
      UART2 - MAIN PORT
      UART3 - USB CDC PORT

      -
    • -
    • baudratec - 波特率,int类型,支持常用波特率,如48009600192003840057600115200230400等;

    • -
    • databits - 数据位[5 ~ 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)
    -
    -

    参数描述:

    -
      -
    • UARTn - UART编号,int类型,UARTn说明如下:
      UART0 - DEBUG PORT
      UART1 - BT PORT
      UART2 - MAIN PORT
      UART3 - USB CDC PORT

      -
    • -
    • baudratec - 波特率,int类型,支持常用波特率,如48009600192003840057600115200230400等;

    • -
    • databits - 数据位[5 ~ 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)
    -
    -

    参数描述:

    -
      -
    • UARTn - UART编号,int类型,UARTn说明如下:
      UART0 - DEBUG PORT
      UART1 - BT PORT
      UART2 - MAIN PORT
      UART3 - USB CDC PORT

      -
    • -
    • baudratec - 波特率,int类型,支持常用波特率,如48009600192003840057600115200230400等;

    • -
    • databits - 数据位[5 ~ 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)
    -
    -

    参数描述:

    -
      -
    • UARTn - UART编号,int类型,UARTn说明如下:
      UART0 - DEBUG PORT
      UART1 - BT PORT
      UART2 - MAIN PORT
      UART3 - USB CDC PORT

      -
    • -
    • baudratec - 波特率,int类型,支持常用波特率,如48009600192003840057600115200230400等;

    • -
    • databits - 数据位[5 ~ 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)
    -
    -

    参数描述:

    -
      -
    • UARTn - UART编号,int类型,UARTn说明如下:
      UART0 - DEBUG PORT
      UART1 - BT PORT
      UART2 - MAIN PORT
      UART3 - USB CDC PORT
      uart4 - STDOUT PORT

      -
    • -
    • baudratec - 波特率,int类型,支持常用波特率,如48009600192003840057600115200230400等;

    • -
    • databits - 数据位[5 ~ 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)
    -
    -

    参数描述:

    -
      -
    • UARTn - UART编号,int类型,UARTn说明如下:
      UART0 - DEBUG PORT
      UART1 - BT PORT
      UART2 - MAIN PORT
      UART3 - USB CDC PORT

    • -
    • baudratec - 波特率,int类型,支持常用波特率,如48009600192003840057600115200230400等;

    • -
    • databits - 数据位[5 ~ 8],int类型。

    • -
    • parity - 奇偶校验(0 – NONE,1 – EVEN,2 – ODD),int类型。

    • -
    • stopbits - 停止位[1 ~ 2],int类型。

    • -
    • flowctl - 硬件控制流(0 – FC_NONE, 1 – FC_HW),int类型。

    • -
    -
    -
    - -**UART引脚对应关系 :** - -
    - +
    + - - - - - + + + + + + - - - - - + + + + + + - - - - - + + + + + +
    uart编号 TX引脚 RX引脚 RTS引脚 CTS引脚注意
    uart1引脚号124引脚号123uart0(建议使用其他uart)引脚号12引脚号11
    uart2引脚号32引脚号31引脚号34引脚号33uart1引脚号63(EC200ACN_LA: 引脚号26)引脚号66(EC200ACN_LA: 引脚号27) EC200ACN_LA模组uart1引脚号与其他型号不同
    uart4引脚号103引脚号104uart2引脚号67引脚号68
    - +
    + - - - - - + + + + + + - - - - - + + + + + + - - - - - + + + + + +
    uart编号 TX引脚 RX引脚 RTS引脚 CTS引脚注意
    uart1引脚号138引脚号137uart0引脚号71引脚号72
    uart2引脚号67引脚号68引脚号65引脚号64uart1引脚号3引脚号2
    uart4引脚号82(EC200UXXAA不支持)引脚号81uart2引脚号32引脚号31
    - +
    + + - - - - - - - - - - - - - - - - - - -
    uart编号 TX引脚 RX引脚RTS引脚CTS引脚 注意
    uart0(建议使用其他uart)引脚号12引脚号11
    uart1引脚号63(EC200ACN_LA: 引脚号26)引脚号66(EC200ACN_LA: 引脚号27)
    uart2引脚号67引脚号68EC200ACN_LA模组uart1引脚号与其他型号不同
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    uart编号TX引脚RX引脚注意
    uart0(建议使用其他uart)引脚号12引脚号11
    uart1引脚号63(EC200ACN_LA: 引脚号26)引脚号66(EC200ACN_LA: 引脚号27)EC200ACN_LA模组uart1引脚号与其他型号不同
    uart2引脚号67引脚号68
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    uart编号TX引脚RX引脚
    uart0引脚号71引脚号72
    uart1引脚号3引脚号2
    uart2引脚号32引脚号31
    - - - - - - - - - - - - - + + + + + + + + + + + +
    uart编号TX引脚RX引脚
    uart0引脚号71引脚号72uart0引脚号71引脚号72
    uart1 引脚号3 引脚号2
    uart2 引脚号32 引脚号31
    @@ -672,6 +324,9 @@ uart编号 TX引脚 RX引脚 + RTS引脚 + CTS引脚 + 注意 @@ -679,16 +334,25 @@ uart0 引脚号21 引脚号20 + + + uart1 引脚号27 引脚号28 + + + uart2 引脚号50 引脚号49 + + + @@ -698,6 +362,9 @@ uart编号 TX引脚 RX引脚 + RTS引脚 + CTS引脚 + 注意 @@ -705,16 +372,25 @@ uart0 引脚号39 引脚号38 + + + uart1 引脚号50 引脚号51 + + + uart2 引脚号18 引脚号17 + + + @@ -724,6 +400,9 @@ uart编号 TX引脚 RX引脚 + RTS引脚 + CTS引脚 + 注意 @@ -731,15 +410,21 @@ uart1 引脚号29 引脚号28 + + + - +
    + + + @@ -747,21 +432,33 @@ + + + + + + + + + + + +
    uart编号 TX引脚 RX引脚RTS引脚CTS引脚注意
    uart0 引脚号23 引脚号22
    uart1 引脚号27 引脚号28
    uart2 引脚号64 引脚号65
    uart4 引脚号35 引脚号34
    @@ -771,6 +468,9 @@ uart编号 TX引脚 RX引脚 + RTS引脚 + CTS引脚 + 注意 @@ -778,21 +478,33 @@ uart0 引脚号71 引脚号72 + + + uart1(flowctl = 0) 引脚号3 引脚号2 + + + uart1(flowctl = 1) 引脚号33 引脚号34 + + + uart2 引脚号32 引脚号31 + + + @@ -804,6 +516,7 @@ RX引脚 RTS引脚 CTS引脚 + 注意 @@ -811,8 +524,9 @@ uart1 引脚号27 引脚号28 - - + + + uart2 @@ -820,13 +534,15 @@ 引脚号34 引脚号37 引脚号36 + uart4 引脚号19 引脚号18 - - + + + @@ -836,6 +552,8 @@ uart编号 TX引脚 RX引脚 + RTS引脚 + CTS引脚 注意 @@ -844,31 +562,41 @@ uart0 引脚号39 引脚号38 - + + + uart1(flowctl = 0) 引脚号50 引脚号51 - EC800MCNGA 、CNGB、CNGD/ EG810MCNGA、CNGB 模块的 uart1 不可用 + + + uart1(flowctl = 1) 引脚号22 引脚号23 - + + + EC800MCNGA 、CNGB、CNGD/ EG810MCNGA、CNGB 模块的 uart1 不可用 uart2 引脚号18 引脚号17 - + + + uart4 引脚号29 引脚号28 - + + + @@ -878,6 +606,8 @@ uart编号 TX引脚 RX引脚 + RTS引脚 + CTS引脚 注意 @@ -886,31 +616,41 @@ uart0 引脚号39 引脚号38 - + + + uart1(flowctl = 0) 引脚号50 引脚号51 - EC800MCNGA 、CNGB、CNGD/ EG810MCNGA、CNGB 模块的 uart1 不可用 + + + uart1(flowctl = 1) 引脚号22 引脚号23 - + + + EC800MCNGA 、CNGB、CNGD/ EG810MCNGA、CNGB 模块的 uart1 不可用 uart2 引脚号18 引脚号17 - + + + uart4 引脚号29 引脚号28 - + + + @@ -920,6 +660,9 @@ uart编号 TX引脚 RX引脚 + RTS引脚 + CTS引脚 + 注意 @@ -927,21 +670,33 @@ uart0 引脚号23 引脚号22 + + + uart1(flowctl = 0) 引脚号27 引脚号28 + + + uart1(flowctl = 1) 引脚号36 引脚号37 + + + uart2 引脚号35 引脚号34 + + + @@ -951,6 +706,9 @@ uart编号 TX引脚 RX引脚 + RTS引脚 + CTS引脚 + 注意 @@ -958,16 +716,25 @@ uart0 引脚号71 引脚号72 + + + - uart1(EC600ECN_LE&LQ不可用) + uart1 引脚号70 引脚号69 + + + EC600ECN_LE&LQ不可用 uart2 引脚号32 引脚号31 + + + @@ -977,6 +744,9 @@ uart编号 TX引脚 RX引脚 + RTS引脚 + CTS引脚 + 注意 @@ -984,16 +754,25 @@ uart0 引脚号39 引脚号38 + + + uart1 引脚号29 引脚号28 + + + uart2 引脚号18 引脚号17 + + + @@ -1005,6 +784,7 @@ RX引脚 RTS引脚 CTS引脚 + 注意 @@ -1012,8 +792,9 @@ uart0 引脚号124 引脚号123 - - + + + uart2 @@ -1021,27 +802,31 @@ 引脚号31 引脚34 引脚33 + uart4 引脚号116 引脚号9 - - + + + uart5 引脚号125 引脚号126 - - + + + uart6 引脚号106 引脚号105 - - + + + @@ -1051,6 +836,9 @@ uart编号 TX引脚 RX引脚 + RTS引脚 + CTS引脚 + 注意 @@ -1058,21 +846,33 @@ uart1 引脚号29 引脚号28 + + + uart2 引脚号18 引脚号17 + + + uart5 引脚号23 引脚号22 + + + uart6 引脚号86 引脚号83 + + + @@ -1084,6 +884,7 @@ RX引脚 RTS引脚 CTS引脚 + 注意 @@ -1091,8 +892,9 @@ uart1 引脚号27 引脚号28 - - + + + uart2 @@ -1100,13 +902,15 @@ 引脚号34 引脚号37 引脚号36 + - uart4(EG912UGL_AA不可用) + uart4 引脚号19 引脚号18 - - + + + EG912UGL_AA不可用 @@ -1116,6 +920,9 @@ uart编号 TX引脚 RX引脚 + RTS引脚 + CTS引脚 + 注意 @@ -1123,21 +930,33 @@ uart0 引脚号71 引脚号72 + + + uart1(flowctl = 0) 引脚号3 引脚号2 + + + uart1(flowctl = 1) 引脚号33 引脚号34 + + + uart2 引脚号32 引脚号31 + + + @@ -1147,6 +966,8 @@ uart编号 TX引脚 RX引脚 + RTS引脚 + CTS引脚 注意 @@ -1155,25 +976,33 @@ uart0 引脚号39 引脚号38 - + + + uart1(flowctl = 0) 引脚号50 引脚号51 + + EG800KCN不可用 uart1(flowctl = 1) 引脚号22 引脚号23 + + EG800KCN不可用 uart2 引脚号18 引脚号17 - + + + @@ -1183,6 +1012,8 @@ uart编号 TX引脚 RX引脚 + RTS引脚 + CTS引脚 注意 @@ -1191,25 +1022,33 @@ uart0 引脚号39 引脚号38 - + + + uart1(flowctl = 0) 引脚号50 引脚号51 + + EG800KCN不可用 uart1(flowctl = 1) 引脚号22 引脚号23 + + EG800KCN不可用 uart2 引脚号18 引脚号17 - + + + @@ -1221,6 +1060,7 @@ RX引脚 RTS引脚 CTS引脚 + 注意 @@ -1228,15 +1068,17 @@ uart0 引脚号39 引脚号38 - - + + + uart1 引脚号22 引脚号23 - - + + + uart2 @@ -1244,13 +1086,15 @@ 引脚号17 引脚23 引脚22 + uart3 引脚号29 引脚号28 - - + + + @@ -1260,18 +1104,27 @@ uart编号 TX引脚 RX引脚 + RTS引脚 + CTS引脚 + 注意 - uart1 + uart0 引脚号27 引脚号26 + + + - uart2 + uart1 引脚号20 引脚号19 + + + @@ -1281,6 +1134,9 @@ uart编号 TX引脚 RX引脚 + RTS引脚 + CTS引脚 + 注意 @@ -1288,11 +1144,17 @@ uart1 引脚号35 引脚号34 + + + uart2 引脚号28 引脚号27 + + + @@ -1302,6 +1164,9 @@ uart编号 TX引脚 RX引脚 + RTS引脚 + CTS引脚 + 注意 @@ -1309,6 +1174,9 @@ uart0 引脚号21 引脚号22 + + + @@ -1318,6 +1186,9 @@ uart编号 TX引脚 RX引脚 + RTS引脚 + CTS引脚 + 注意 @@ -1325,6 +1196,9 @@ uart0 引脚号22 引脚号21 + + + @@ -1336,6 +1210,7 @@ RX引脚 RTS引脚 CTS引脚 + 注意 @@ -1343,15 +1218,17 @@ uart0 引脚号23 引脚号22 - - + + + uart1 引脚号27 引脚号28 - - + + + uart2 @@ -1359,13 +1236,15 @@ 引脚号34 引脚号36 引脚号37 + - uart4(EG915NEU_AG不支持) + uart4 引脚号36 引脚号37 - - + + + EG915NEU_AG不支持 @@ -1375,6 +1254,9 @@ uart编号 TX引脚 RX引脚 + RTS引脚 + CTS引脚 + 注意 @@ -1382,16 +1264,25 @@ uart0 引脚号39 引脚号38 + + + uart1 引脚号29 引脚号28 + + + uart2 引脚号18 引脚号17 + + + @@ -1399,7 +1290,7 @@
    -

    BG95系列使用UART4需要先调用modem.main_uart_enable_set(1)使能UART4,重启生效,如下

    +

    使用UART4需要先调用modem.main_uart_enable_set(1)使能UART4,重启生效,如下

      import modem
       #获取Main_UART使能状态 1-使能,0-不使能
      @@ -1416,11 +1307,11 @@ modem.main_uart_enable_set(1)
       
       
       
      -

      FCM360W UART2被初始化后交互口将无法使用,需要在代码中执行uart2.close()或者重启模组才可继续使用交互口。

      +

      UART2被初始化后交互口将无法使用,需要在代码中执行uart2.close()或者重启模组才可继续使用交互口。

      -

      FCM362K UART1被初始化后交互口将无法使用,需要在代码中执行uart1.close()或者重启模组才可继续使用交互口。

      +

      UART1被初始化后交互口将无法使用,需要在代码中执行uart1.close()或者重启模组才可继续使用交互口。

    @@ -1498,440 +1389,7 @@ uart.close() 成功返回整型值`0`,失败返回整型值`-1`。
    -
    -

    uart.control_485

    -
    uart.control_485(UART.GPIOn, direction)
    -
    -

    该方法用于控制485通信方向,串口发送数据之前和之后进行拉高拉低指定GPIO,用来指示485通信的方向。

    -

    参数描述:

    -
      -
    • GPIOn - 需要控制的GPIO引脚号,参照[Pin模块](machine.Pin.md)的引脚定义,int类型。

      -
    • -
    • direction - 引脚电平变化,int类型,说明如下:
      1表示引脚电平变化为:串口发送数据之前由低拉高、发送数据之后再由高拉低
      0表示引脚电平变化为:串口发送数据之前由高拉低、发送数据之后再由低拉高

      -
    • -
    -

    返回值描述:

    -

    成功返回整型值0,失败返回整型值-1

    -

    示例:

    -
    from machine import UART
    uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
    art1.control_485(UART.GPIO24, 1) -
    - -
    -

    uart.control_485

    -
    uart.control_485(UART.GPIOn, direction)
    -
    -

    该方法用于控制485通信方向,串口发送数据之前和之后进行拉高拉低指定GPIO,用来指示485通信的方向。

    -

    参数描述:

    -
      -
    • GPIOn - 需要控制的GPIO引脚号,参照[Pin模块](machine.Pin.md)的引脚定义,int类型。

      -
    • -
    • direction - 引脚电平变化,int类型,说明如下:
      1表示引脚电平变化为:串口发送数据之前由低拉高、发送数据之后再由高拉低
      0表示引脚电平变化为:串口发送数据之前由高拉低、发送数据之后再由低拉高

      -
    • -
    -

    返回值描述:

    -

    成功返回整型值0,失败返回整型值-1

    -

    示例:

    -
    from machine import UART
    uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
    art1.control_485(UART.GPIO24, 1) -
    - -
    -

    uart.control_485

    -
    uart.control_485(UART.GPIOn, direction)
    -
    -

    该方法用于控制485通信方向,串口发送数据之前和之后进行拉高拉低指定GPIO,用来指示485通信的方向。

    -

    参数描述:

    -
      -
    • GPIOn - 需要控制的GPIO引脚号,参照[Pin模块](machine.Pin.md)的引脚定义,int类型。

      -
    • -
    • direction - 引脚电平变化,int类型,说明如下:
      1表示引脚电平变化为:串口发送数据之前由低拉高、发送数据之后再由高拉低
      0表示引脚电平变化为:串口发送数据之前由高拉低、发送数据之后再由低拉高

      -
    • -
    -

    返回值描述:

    -

    成功返回整型值0,失败返回整型值-1

    -

    示例:

    -
    from machine import UART
    uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
    art1.control_485(UART.GPIO24, 1) -
    - -
    -

    uart.control_485

    -
    uart.control_485(UART.GPIOn, direction)
    -
    -

    该方法用于控制485通信方向,串口发送数据之前和之后进行拉高拉低指定GPIO,用来指示485通信的方向。

    -

    参数描述:

    -
      -
    • GPIOn - 需要控制的GPIO引脚号,参照[Pin模块](machine.Pin.md)的引脚定义,int类型。

      -
    • -
    • direction - 引脚电平变化,int类型,说明如下:
      1表示引脚电平变化为:串口发送数据之前由低拉高、发送数据之后再由高拉低
      0表示引脚电平变化为:串口发送数据之前由高拉低、发送数据之后再由低拉高

      -
    • -
    -

    返回值描述:

    -

    成功返回整型值0,失败返回整型值-1

    -

    示例:

    -
    from machine import UART
    uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
    art1.control_485(UART.GPIO24, 1) -
    - -
    -

    uart.control_485

    -
    uart.control_485(UART.GPIOn, direction)
    -
    -

    该方法用于控制485通信方向,串口发送数据之前和之后进行拉高拉低指定GPIO,用来指示485通信的方向。

    -

    参数描述:

    -
      -
    • GPIOn - 需要控制的GPIO引脚号,参照[Pin模块](machine.Pin.md)的引脚定义,int类型。

      -
    • -
    • direction - 引脚电平变化,int类型,说明如下:
      1表示引脚电平变化为:串口发送数据之前由低拉高、发送数据之后再由高拉低
      0表示引脚电平变化为:串口发送数据之前由高拉低、发送数据之后再由低拉高

      -
    • -
    -

    返回值描述:

    -

    成功返回整型值0,失败返回整型值-1

    -

    示例:

    -
    from machine import UART
    uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
    art1.control_485(UART.GPIO24, 1) -
    - -
    -

    uart.control_485

    -
    uart.control_485(UART.GPIOn, direction)
    -
    -

    该方法用于控制485通信方向,串口发送数据之前和之后进行拉高拉低指定GPIO,用来指示485通信的方向。

    -

    参数描述:

    -
      -
    • GPIOn - 需要控制的GPIO引脚号,参照[Pin模块](machine.Pin.md)的引脚定义,int类型。

      -
    • -
    • direction - 引脚电平变化,int类型,说明如下:
      1表示引脚电平变化为:串口发送数据之前由低拉高、发送数据之后再由高拉低
      0表示引脚电平变化为:串口发送数据之前由高拉低、发送数据之后再由低拉高

      -
    • -
    -

    返回值描述:

    -

    成功返回整型值0,失败返回整型值-1

    -

    示例:

    -
    from machine import UART
    uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
    art1.control_485(UART.GPIO24, 1) -
    - -
    -

    uart.control_485

    -
    uart.control_485(UART.GPIOn, direction)
    -
    -

    该方法用于控制485通信方向,串口发送数据之前和之后进行拉高拉低指定GPIO,用来指示485通信的方向。

    -

    参数描述:

    -
      -
    • GPIOn - 需要控制的GPIO引脚号,参照[Pin模块](machine.Pin.md)的引脚定义,int类型。

      -
    • -
    • direction - 引脚电平变化,int类型,说明如下:
      1表示引脚电平变化为:串口发送数据之前由低拉高、发送数据之后再由高拉低
      0表示引脚电平变化为:串口发送数据之前由高拉低、发送数据之后再由低拉高

      -
    • -
    -

    返回值描述:

    -

    成功返回整型值0,失败返回整型值-1

    -

    示例:

    -
    from machine import UART
    uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
    art1.control_485(UART.GPIO24, 1) -
    - -
    -

    uart.control_485

    -
    uart.control_485(UART.GPIOn, direction)
    -
    -

    该方法用于控制485通信方向,串口发送数据之前和之后进行拉高拉低指定GPIO,用来指示485通信的方向。

    -

    参数描述:

    -
      -
    • GPIOn - 需要控制的GPIO引脚号,参照[Pin模块](machine.Pin.md)的引脚定义,int类型。

      -
    • -
    • direction - 引脚电平变化,int类型,说明如下:
      1表示引脚电平变化为:串口发送数据之前由低拉高、发送数据之后再由高拉低
      0表示引脚电平变化为:串口发送数据之前由高拉低、发送数据之后再由低拉高

      -
    • -
    -

    返回值描述:

    -

    成功返回整型值0,失败返回整型值-1

    -

    示例:

    -
    from machine import UART
    uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
    art1.control_485(UART.GPIO24, 1) -
    - -
    -

    uart.control_485

    -
    uart.control_485(UART.GPIOn, direction)
    -
    -

    该方法用于控制485通信方向,串口发送数据之前和之后进行拉高拉低指定GPIO,用来指示485通信的方向。

    -

    参数描述:

    -
      -
    • GPIOn - 需要控制的GPIO引脚号,参照[Pin模块](machine.Pin.md)的引脚定义,int类型。

      -
    • -
    • direction - 引脚电平变化,int类型,说明如下:
      1表示引脚电平变化为:串口发送数据之前由低拉高、发送数据之后再由高拉低
      0表示引脚电平变化为:串口发送数据之前由高拉低、发送数据之后再由低拉高

      -
    • -
    -

    返回值描述:

    -

    成功返回整型值0,失败返回整型值-1

    -

    示例:

    -
    from machine import UART
    uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
    art1.control_485(UART.GPIO24, 1) -
    - - -
    -

    uart.control_485

    -
    uart.control_485(UART.GPIOn, direction)
    -
    -

    该方法用于控制485通信方向,串口发送数据之前和之后进行拉高拉低指定GPIO,用来指示485通信的方向。

    -

    参数描述:

    -
      -
    • GPIOn - 需要控制的GPIO引脚号,参照[Pin模块](machine.Pin.md)的引脚定义,int类型。

      -
    • -
    • direction - 引脚电平变化,int类型,说明如下:
      1表示引脚电平变化为:串口发送数据之前由低拉高、发送数据之后再由高拉低
      0表示引脚电平变化为:串口发送数据之前由高拉低、发送数据之后再由低拉高

      -
    • -
    -

    返回值描述:

    -

    成功返回整型值0,失败返回整型值-1

    -

    示例:

    -
    from machine import UART
    uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
    art1.control_485(UART.GPIO24, 1) -
    - -
    -

    uart.control_485

    -
    uart.control_485(UART.GPIOn, direction)
    -
    -

    该方法用于控制485通信方向,串口发送数据之前和之后进行拉高拉低指定GPIO,用来指示485通信的方向。

    -

    参数描述:

    -
      -
    • GPIOn - 需要控制的GPIO引脚号,参照[Pin模块](machine.Pin.md)的引脚定义,int类型。

      -
    • -
    • direction - 引脚电平变化,int类型,说明如下:
      1表示引脚电平变化为:串口发送数据之前由低拉高、发送数据之后再由高拉低
      0表示引脚电平变化为:串口发送数据之前由高拉低、发送数据之后再由低拉高

      -
    • -
    -

    返回值描述:

    -

    成功返回整型值0,失败返回整型值-1

    -

    示例:

    -
    from machine import UART
    uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
    art1.control_485(UART.GPIO24, 1) -
    - -
    -

    uart.control_485

    -
    uart.control_485(UART.GPIOn, direction)
    -
    -

    该方法用于控制485通信方向,串口发送数据之前和之后进行拉高拉低指定GPIO,用来指示485通信的方向。

    -

    参数描述:

    -
      -
    • GPIOn - 需要控制的GPIO引脚号,参照[Pin模块](machine.Pin.md)的引脚定义,int类型。

      -
    • -
    • direction - 引脚电平变化,int类型,说明如下:
      1表示引脚电平变化为:串口发送数据之前由低拉高、发送数据之后再由高拉低
      0表示引脚电平变化为:串口发送数据之前由高拉低、发送数据之后再由低拉高

      -
    • -
    -

    返回值描述:

    -

    成功返回整型值0,失败返回整型值-1

    -

    示例:

    -
    from machine import UART
    uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
    art1.control_485(UART.GPIO24, 1) -
    - -
    -

    uart.control_485

    -
    uart.control_485(UART.GPIOn, direction)
    -
    -

    该方法用于控制485通信方向,串口发送数据之前和之后进行拉高拉低指定GPIO,用来指示485通信的方向。

    -

    参数描述:

    -
      -
    • GPIOn - 需要控制的GPIO引脚号,参照[Pin模块](machine.Pin.md)的引脚定义,int类型。

      -
    • -
    • direction - 引脚电平变化,int类型,说明如下:
      1表示引脚电平变化为:串口发送数据之前由低拉高、发送数据之后再由高拉低
      0表示引脚电平变化为:串口发送数据之前由高拉低、发送数据之后再由低拉高

      -
    • -
    -

    返回值描述:

    -

    成功返回整型值0,失败返回整型值-1

    -

    示例:

    -
    from machine import UART
    uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
    art1.control_485(UART.GPIO24, 1) -
    - -
    -

    uart.control_485

    -
    uart.control_485(UART.GPIOn, direction)
    -
    -

    该方法用于控制485通信方向,串口发送数据之前和之后进行拉高拉低指定GPIO,用来指示485通信的方向。

    -

    参数描述:

    -
      -
    • GPIOn - 需要控制的GPIO引脚号,参照[Pin模块](machine.Pin.md)的引脚定义,int类型。

      -
    • -
    • direction - 引脚电平变化,int类型,说明如下:
      1表示引脚电平变化为:串口发送数据之前由低拉高、发送数据之后再由高拉低
      0表示引脚电平变化为:串口发送数据之前由高拉低、发送数据之后再由低拉高

      -
    • -
    -

    返回值描述:

    -

    成功返回整型值0,失败返回整型值-1

    -

    示例:

    -
    from machine import UART
    uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
    art1.control_485(UART.GPIO24, 1) -
    - -
    -

    uart.control_485

    -
    uart.control_485(UART.GPIOn, direction)
    -
    -

    该方法用于控制485通信方向,串口发送数据之前和之后进行拉高拉低指定GPIO,用来指示485通信的方向。

    -

    参数描述:

    -
      -
    • GPIOn - 需要控制的GPIO引脚号,参照[Pin模块](machine.Pin.md)的引脚定义,int类型。

      -
    • -
    • direction - 引脚电平变化,int类型,说明如下:
      1表示引脚电平变化为:串口发送数据之前由低拉高、发送数据之后再由高拉低
      0表示引脚电平变化为:串口发送数据之前由高拉低、发送数据之后再由低拉高

      -
    • -
    -

    返回值描述:

    -

    成功返回整型值0,失败返回整型值-1

    -

    示例:

    -
    from machine import UART
    uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
    art1.control_485(UART.GPIO24, 1) -
    - -
    -

    uart.control_485

    -
    uart.control_485(UART.GPIOn, direction)
    -
    -

    该方法用于控制485通信方向,串口发送数据之前和之后进行拉高拉低指定GPIO,用来指示485通信的方向。

    -

    参数描述:

    -
      -
    • GPIOn - 需要控制的GPIO引脚号,参照[Pin模块](machine.Pin.md)的引脚定义,int类型。

      -
    • -
    • direction - 引脚电平变化,int类型,说明如下:
      1表示引脚电平变化为:串口发送数据之前由低拉高、发送数据之后再由高拉低
      0表示引脚电平变化为:串口发送数据之前由高拉低、发送数据之后再由低拉高

      -
    • -
    -

    返回值描述:

    -

    成功返回整型值0,失败返回整型值-1

    -

    示例:

    -
    from machine import UART
    uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
    art1.control_485(UART.GPIO24, 1) -
    - -
    -

    uart.control_485

    -
    uart.control_485(UART.GPIOn, direction)
    -
    -

    该方法用于控制485通信方向,串口发送数据之前和之后进行拉高拉低指定GPIO,用来指示485通信的方向。

    -

    参数描述:

    -
      -
    • GPIOn - 需要控制的GPIO引脚号,参照[Pin模块](machine.Pin.md)的引脚定义,int类型。

      -
    • -
    • direction - 引脚电平变化,int类型,说明如下:
      1表示引脚电平变化为:串口发送数据之前由低拉高、发送数据之后再由高拉低
      0表示引脚电平变化为:串口发送数据之前由高拉低、发送数据之后再由低拉高

      -
    • -
    -

    返回值描述:

    -

    成功返回整型值0,失败返回整型值-1

    -

    示例:

    -
    from machine import UART
    uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
    art1.control_485(UART.GPIO24, 1) -
    - -
    -

    uart.control_485

    -
    uart.control_485(UART.GPIOn, direction)
    -
    -

    该方法用于控制485通信方向,串口发送数据之前和之后进行拉高拉低指定GPIO,用来指示485通信的方向。

    -

    参数描述:

    -
      -
    • GPIOn - 需要控制的GPIO引脚号,参照[Pin模块](machine.Pin.md)的引脚定义,int类型。

      -
    • -
    • direction - 引脚电平变化,int类型,说明如下:
      1表示引脚电平变化为:串口发送数据之前由低拉高、发送数据之后再由高拉低
      0表示引脚电平变化为:串口发送数据之前由高拉低、发送数据之后再由低拉高

      -
    • -
    -

    返回值描述:

    -

    成功返回整型值0,失败返回整型值-1

    -

    示例:

    -
    from machine import UART
    uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
    art1.control_485(UART.GPIO24, 1) -
    - -
    -

    uart.control_485

    -
    uart.control_485(UART.GPIOn, direction)
    -
    -

    该方法用于控制485通信方向,串口发送数据之前和之后进行拉高拉低指定GPIO,用来指示485通信的方向。

    -

    参数描述:

    -
      -
    • GPIOn - 需要控制的GPIO引脚号,参照[Pin模块](machine.Pin.md)的引脚定义,int类型。

      -
    • -
    • direction - 引脚电平变化,int类型,说明如下:
      1表示引脚电平变化为:串口发送数据之前由低拉高、发送数据之后再由高拉低
      0表示引脚电平变化为:串口发送数据之前由高拉低、发送数据之后再由低拉高

      -
    • -
    -

    返回值描述:

    -

    成功返回整型值0,失败返回整型值-1

    -

    示例:

    -
    from machine import UART
    uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
    art1.control_485(UART.GPIO24, 1) -
    - -
    -

    uart.control_485

    -
    uart.control_485(UART.GPIOn, direction)
    -
    -

    该方法用于控制485通信方向,串口发送数据之前和之后进行拉高拉低指定GPIO,用来指示485通信的方向。

    -

    参数描述:

    -
      -
    • GPIOn - 需要控制的GPIO引脚号,参照[Pin模块](machine.Pin.md)的引脚定义,int类型。

      -
    • -
    • direction - 引脚电平变化,int类型,说明如下:
      1表示引脚电平变化为:串口发送数据之前由低拉高、发送数据之后再由高拉低
      0表示引脚电平变化为:串口发送数据之前由高拉低、发送数据之后再由低拉高

      -
    • -
    -

    返回值描述:

    -

    成功返回整型值0,失败返回整型值-1

    -

    示例:

    -
    from machine import UART
    uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
    art1.control_485(UART.GPIO24, 1) -
    - -
    -

    uart.control_485

    -
    uart.control_485(UART.GPIOn, direction)
    -
    -

    该方法用于控制485通信方向,串口发送数据之前和之后进行拉高拉低指定GPIO,用来指示485通信的方向。

    -

    参数描述:

    -
      -
    • GPIOn - 需要控制的GPIO引脚号,参照[Pin模块](machine.Pin.md)的引脚定义,int类型。

      -
    • -
    • direction - 引脚电平变化,int类型,说明如下:
      1表示引脚电平变化为:串口发送数据之前由低拉高、发送数据之后再由高拉低
      0表示引脚电平变化为:串口发送数据之前由高拉低、发送数据之后再由低拉高

      -
    • -
    -

    返回值描述:

    -

    成功返回整型值0,失败返回整型值-1

    -

    示例:

    -
    from machine import UART
    uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
    art1.control_485(UART.GPIO24, 1) -
    - -
    -

    uart.control_485

    -
    uart.control_485(UART.GPIOn, direction)
    -
    -

    该方法用于控制485通信方向,串口发送数据之前和之后进行拉高拉低指定GPIO,用来指示485通信的方向。

    -

    参数描述:

    -
      -
    • GPIOn - 需要控制的GPIO引脚号,参照[Pin模块](machine.Pin.md)的引脚定义,int类型。

      -
    • -
    • direction - 引脚电平变化,int类型,说明如下:
      1表示引脚电平变化为:串口发送数据之前由低拉高、发送数据之后再由高拉低
      0表示引脚电平变化为:串口发送数据之前由高拉低、发送数据之后再由低拉高

      -
    • -
    -

    返回值描述:

    -

    成功返回整型值0,失败返回整型值-1

    -

    示例:

    -
    from machine import UART
    uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
    art1.control_485(UART.GPIO24, 1) -
    - -
    -

    uart.control_485

    -
    uart.control_485(UART.GPIOn, direction)
    -
    -

    该方法用于控制485通信方向,串口发送数据之前和之后进行拉高拉低指定GPIO,用来指示485通信的方向。

    -

    参数描述:

    -
      -
    • GPIOn - 需要控制的GPIO引脚号,参照[Pin模块](machine.Pin.md)的引脚定义,int类型。

      -
    • -
    • direction - 引脚电平变化,int类型,说明如下:
      1表示引脚电平变化为:串口发送数据之前由低拉高、发送数据之后再由高拉低
      0表示引脚电平变化为:串口发送数据之前由高拉低、发送数据之后再由低拉高

      -
    • -
    -

    返回值描述:

    -

    成功返回整型值0,失败返回整型值-1

    -

    示例:

    -
    from machine import UART
    uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
    art1.control_485(UART.GPIO24, 1) -
    - -
    -

    uart.control_485

    -
    uart.control_485(UART.GPIOn, direction)
    -
    -

    该方法用于控制485通信方向,串口发送数据之前和之后进行拉高拉低指定GPIO,用来指示485通信的方向。

    -

    参数描述:

    -
      -
    • GPIOn - 需要控制的GPIO引脚号,参照[Pin模块](machine.Pin.md)的引脚定义,int类型。

      -
    • -
    • direction - 引脚电平变化,int类型,说明如下:
      1表示引脚电平变化为:串口发送数据之前由低拉高、发送数据之后再由高拉低
      0表示引脚电平变化为:串口发送数据之前由高拉低、发送数据之后再由低拉高

      -
    • -
    -

    返回值描述:

    -

    成功返回整型值0,失败返回整型值-1

    -

    示例:

    -
    from machine import UART
    uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
    art1.control_485(UART.GPIO24, 1) -
    - -
    +

    uart.control_485

    uart.control_485(UART.GPIOn, direction)
     
    diff --git a/zh/peripherals/misc.ADC.md b/zh/peripherals/misc.ADC.md index b502760..d2353b2 100644 --- a/zh/peripherals/misc.ADC.md +++ b/zh/peripherals/misc.ADC.md @@ -492,7 +492,6 @@ ADC.close() ADC0 引脚号2 - -- Gitee From 5db506f244edc136d51615d218f3941457a4347d Mon Sep 17 00:00:00 2001 From: "joey.zhou" <2775152163@qq.com> Date: Tue, 18 Mar 2025 10:54:28 +0800 Subject: [PATCH 2/4] uart_adc --- en/peripherals/machine.UART.md | 258 ++++++++++++++++----------------- 1 file changed, 129 insertions(+), 129 deletions(-) diff --git a/en/peripherals/machine.UART.md b/en/peripherals/machine.UART.md index bfa335d..7cbe4b6 100644 --- a/en/peripherals/machine.UART.md +++ b/en/peripherals/machine.UART.md @@ -61,7 +61,7 @@ This class transmits data through the UART.
    - + @@ -71,7 +71,7 @@ This class transmits data through the UART. - + @@ -79,7 +79,7 @@ This class transmits data through the UART. - + @@ -87,7 +87,7 @@ This class transmits data through the UART. - + @@ -99,7 +99,7 @@ This class transmits data through the UART.
    uart numberUART number TX pin RX pin RTS pin
    uart1UART1 pin124 pin123
    uart2UART2 pin32 pin31 pin34
    uart4UART4 pin103 pin104
    - + @@ -109,7 +109,7 @@ This class transmits data through the UART. - + @@ -117,7 +117,7 @@ This class transmits data through the UART. - + @@ -125,7 +125,7 @@ This class transmits data through the UART. - + @@ -137,7 +137,7 @@ This class transmits data through the UART.
    uart numberUART number TX pin RX pin RTS pin
    uart1UART1 pin138 pin137
    uart2UART2 pin67 pin68 pin65
    uart4UART4 pin82(EC200UXXAA is not supported.) pin81
    - + @@ -147,7 +147,7 @@ This class transmits data through the UART. - + @@ -155,15 +155,15 @@ This class transmits data through the UART. - + - + - + @@ -175,7 +175,7 @@ This class transmits data through the UART.
    uart numberUART number TX pin RX pin RTS pin
    uart0(The use of other Uarts is recommended.)UART0(The use of other uarts is recommended.) pin12 pin11
    uart1UART1 pin63(EC200ACN_LA: pin26) pin66(EC200ACN_LA: pin27) EC200ACN_LA module uart1pin is different from other models.EC200ACN_LA module uart1 pin is different from other models.
    uart2UART2 pin67 pin68
    - + @@ -185,7 +185,7 @@ This class transmits data through the UART. - + @@ -193,15 +193,15 @@ This class transmits data through the UART. - + - + - + @@ -213,7 +213,7 @@ This class transmits data through the UART.
    uart numberUART number TX pin RX pin RTS pin
    uart0(The use of other Uarts is recommended.)UART0(The use of other uarts is recommended.) pin12 pin11
    uart1UART1 pin63(EC200ACN_LA: pin26) pin66(EC200ACN_LA: pin27) EC200ACN_LA module uart1pin is different from other models.EC200ACN_LA module uart1 pin is different from other models.
    uart2UART2 pin67 pin68
    - + @@ -223,7 +223,7 @@ This class transmits data through the UART. - + @@ -231,7 +231,7 @@ This class transmits data through the UART. - + @@ -239,7 +239,7 @@ This class transmits data through the UART. - + @@ -251,7 +251,7 @@ This class transmits data through the UART.
    uart numberUART number TX pin RX pin RTS pin
    uart0UART0 pin71 pin72
    uart1UART1 pin3 pin2
    uart2UART2 pin32 pin31
    - + @@ -261,7 +261,7 @@ This class transmits data through the UART. - + @@ -269,7 +269,7 @@ This class transmits data through the UART. - + @@ -277,7 +277,7 @@ This class transmits data through the UART. - + @@ -289,7 +289,7 @@ This class transmits data through the UART.
    uart numberUART number TX pin RX pin RTS pin
    uart0UART0 pin71 pin72
    uart1UART1 pin3 pin2
    uart2UART2 pin32 pin31
    - + @@ -299,7 +299,7 @@ This class transmits data through the UART. - + @@ -307,7 +307,7 @@ This class transmits data through the UART. - + @@ -315,7 +315,7 @@ This class transmits data through the UART. - + @@ -327,7 +327,7 @@ This class transmits data through the UART.
    uart numberUART number TX pin RX pin RTS pin
    uart0UART0 pin21 pin20
    uart1UART1 pin27 pin28
    uart2UART2 pin50 pin49
    - + @@ -337,7 +337,7 @@ This class transmits data through the UART. - + @@ -345,7 +345,7 @@ This class transmits data through the UART. - + @@ -353,7 +353,7 @@ This class transmits data through the UART. - + @@ -365,7 +365,7 @@ This class transmits data through the UART.
    uart numberUART number TX pin RX pin RTS pin
    uart0UART0 pin39 pin38
    uart1UART1 pin50 pin51
    uart2UART2 pin18 pin17
    - + @@ -375,7 +375,7 @@ This class transmits data through the UART. - + @@ -387,7 +387,7 @@ This class transmits data through the UART.
    uart numberUART number TX pin RX pin RTS pin
    uart1UART1 pin29 pin28
    - + @@ -397,7 +397,7 @@ This class transmits data through the UART. - + @@ -405,7 +405,7 @@ This class transmits data through the UART. - + @@ -413,7 +413,7 @@ This class transmits data through the UART. - + @@ -421,7 +421,7 @@ This class transmits data through the UART. - + @@ -433,7 +433,7 @@ This class transmits data through the UART.
    uart numberUART number TX pin RX pin RTS pin
    uart0UART0 pin23 pin22
    uart1UART1 pin27 pin28
    uart2UART2 pin64 pin65
    uart4UART4 pin35 pin34
    - + @@ -443,7 +443,7 @@ This class transmits data through the UART. - + @@ -451,7 +451,7 @@ This class transmits data through the UART. - + @@ -459,7 +459,7 @@ This class transmits data through the UART. - + @@ -467,7 +467,7 @@ This class transmits data through the UART. - + @@ -479,7 +479,7 @@ This class transmits data through the UART.
    uart numberUART number TX pin RX pin RTS pin
    uart0UART0 pin71 pin72
    uart1(flowctl = 0)UART1(flowctl = 0) pin3 pin2
    uart1(flowctl = 1)UART1(flowctl = 1) pin33 pin34
    uart2UART2 pin32 pin31
    - + @@ -489,7 +489,7 @@ This class transmits data through the UART. - + @@ -497,7 +497,7 @@ This class transmits data through the UART. - + @@ -505,7 +505,7 @@ This class transmits data through the UART. - + @@ -517,7 +517,7 @@ This class transmits data through the UART.
    uart numberUART number TX pin RX pin RTS pin
    uart1UART1 pin27 pin28
    uart2UART2 pin35 pin34 pin37
    uart4UART4 pin19 pin18
    - + @@ -527,7 +527,7 @@ This class transmits data through the UART. - + @@ -535,7 +535,7 @@ This class transmits data through the UART. - + @@ -543,7 +543,7 @@ This class transmits data through the UART. - + @@ -551,7 +551,7 @@ This class transmits data through the UART. - + @@ -559,7 +559,7 @@ This class transmits data through the UART. - + @@ -571,7 +571,7 @@ This class transmits data through the UART.
    uart numberUART number TX pin RX pin RTS pin
    uart0UART0 pin39 pin38
    uart1(flowctl = 0)UART1(flowctl = 0) pin50 pin51
    uart1(flowctl = 1)UART1(flowctl = 1) pin22 pin23 Uart1 is not available for EC800MCNGA, CNGB, CNGD/ EG810MCNGA, and CNGB modules.
    uart2UART2 pin18 pin17
    uart4UART4 pin29 pin28
    - + @@ -581,7 +581,7 @@ This class transmits data through the UART. - + @@ -589,7 +589,7 @@ This class transmits data through the UART. - + @@ -597,7 +597,7 @@ This class transmits data through the UART. - + @@ -605,7 +605,7 @@ This class transmits data through the UART. - + @@ -613,7 +613,7 @@ This class transmits data through the UART. - + @@ -625,7 +625,7 @@ This class transmits data through the UART.
    uart numberUART number TX pin RX pin RTS pin
    uart0UART0 pin39 pin38
    uart1(flowctl = 0)UART1(flowctl = 0) pin50 pin51
    uart1(flowctl = 1)UART1(flowctl = 1) pin22 pin23 Uart1 is not available for EC800MCNGA, CNGB, CNGD/ EG810MCNGA, and CNGB modules.
    uart2UART2 pin18 pin17
    uart4UART4 pin29 pin28
    - + @@ -635,7 +635,7 @@ This class transmits data through the UART. - + @@ -643,7 +643,7 @@ This class transmits data through the UART. - + @@ -651,7 +651,7 @@ This class transmits data through the UART. - + @@ -659,7 +659,7 @@ This class transmits data through the UART. - + @@ -671,7 +671,7 @@ This class transmits data through the UART.
    uart numberUART number TX pin RX pin RTS pin
    uart0UART0 pin23 pin22
    uart1(flowctl = 0)UART1(flowctl = 0) pin27 pin28
    uart1(flowctl = 1)UART1(flowctl = 1) pin36 pin37
    uart2UART2 pin35 pin34
    - + @@ -681,7 +681,7 @@ This class transmits data through the UART. - + @@ -689,7 +689,7 @@ This class transmits data through the UART. - + @@ -697,7 +697,7 @@ This class transmits data through the UART. - + @@ -709,7 +709,7 @@ This class transmits data through the UART.
    uart numberUART number TX pin RX pin RTS pin
    uart0UART0 pin71 pin72
    uart1UART1 pin70 pin69 EC600ECN_LE&LQ is not available.
    uart2UART2 pin32 pin31
    - + @@ -719,7 +719,7 @@ This class transmits data through the UART. - + @@ -727,7 +727,7 @@ This class transmits data through the UART. - + @@ -735,7 +735,7 @@ This class transmits data through the UART. - + @@ -747,7 +747,7 @@ This class transmits data through the UART.
    uart numberUART number TX pin RX pin RTS pin
    uart0UART0 pin39 pin38
    uart1UART1 pin29 pin28
    uart2UART2 pin18 pin17
    - + @@ -757,7 +757,7 @@ This class transmits data through the UART. - + @@ -765,7 +765,7 @@ This class transmits data through the UART. - + @@ -773,7 +773,7 @@ This class transmits data through the UART. - + @@ -781,7 +781,7 @@ This class transmits data through the UART. - + @@ -789,7 +789,7 @@ This class transmits data through the UART. - + @@ -801,7 +801,7 @@ This class transmits data through the UART.
    uart numberUART number TX pin RX pin RTS pin
    uart0UART0 pin124 pin123
    uart2UART2 pin32 pin31 pin34
    uart4UART4 pin116 pin9
    uart5UART5 pin125 pin126
    uart6UART6 pin106 pin105
    - + @@ -811,7 +811,7 @@ This class transmits data through the UART. - + @@ -819,7 +819,7 @@ This class transmits data through the UART. - + @@ -827,7 +827,7 @@ This class transmits data through the UART. - + @@ -835,7 +835,7 @@ This class transmits data through the UART. - + @@ -847,7 +847,7 @@ This class transmits data through the UART.
    uart numberUART number TX pin RX pin RTS pin
    uart1UART1 pin29 pin28
    uart2UART2 pin18 pin17
    uart5UART5 pin23 pin22
    uart6UART6 pin86 pin83
    - + @@ -857,7 +857,7 @@ This class transmits data through the UART. - + @@ -865,7 +865,7 @@ This class transmits data through the UART. - + @@ -873,7 +873,7 @@ This class transmits data through the UART. - + @@ -885,7 +885,7 @@ This class transmits data through the UART.
    uart numberUART number TX pin RX pin RTS pin
    uart1UART1 pin27 pin28
    uart2UART2 pin35 pin34 pin37
    uart4UART4 pin19 pin18
    - + @@ -895,7 +895,7 @@ This class transmits data through the UART. - + @@ -903,7 +903,7 @@ This class transmits data through the UART. - + @@ -911,7 +911,7 @@ This class transmits data through the UART. - + @@ -919,7 +919,7 @@ This class transmits data through the UART. - + @@ -931,7 +931,7 @@ This class transmits data through the UART.
    uart numberUART number TX pin RX pin RTS pin
    uart0UART0 pin71 pin72
    uart1(flowctl = 0)UART1(flowctl = 0) pin3 pin2
    uart1(flowctl = 1)UART1(flowctl = 1) pin33 pin34
    uart2UART2 pin32 pin31
    - + @@ -941,7 +941,7 @@ This class transmits data through the UART. - + @@ -949,7 +949,7 @@ This class transmits data through the UART. - + @@ -957,7 +957,7 @@ This class transmits data through the UART. - + @@ -965,7 +965,7 @@ This class transmits data through the UART. - + @@ -977,7 +977,7 @@ This class transmits data through the UART.
    uart numberUART number TX pin RX pin RTS pin
    uart0UART0 pin39 pin38
    uart1(flowctl = 0)UART1(flowctl = 0) pin50 pin51 EG800KCN is not available.
    uart1(flowctl = 1)UART1(flowctl = 1) pin22 pin23 EG800KCN is not available.
    uart2UART2 pin18 pin17
    - + @@ -987,7 +987,7 @@ This class transmits data through the UART. - + @@ -995,7 +995,7 @@ This class transmits data through the UART. - + @@ -1003,7 +1003,7 @@ This class transmits data through the UART. - + @@ -1011,7 +1011,7 @@ This class transmits data through the UART. - + @@ -1023,7 +1023,7 @@ This class transmits data through the UART.
    uart numberUART number TX pin RX pin RTS pin
    uart0UART0 pin39 pin38
    uart1(flowctl = 0)UART1(flowctl = 0) pin50 pin51 EG800KCN is not available.
    uart1(flowctl = 1)UART1(flowctl = 1) pin22 pin23 EG800KCN is not available.
    uart2UART2 pin18 pin17
    - + @@ -1033,7 +1033,7 @@ This class transmits data through the UART. - + @@ -1041,7 +1041,7 @@ This class transmits data through the UART. - + @@ -1049,7 +1049,7 @@ This class transmits data through the UART. - + @@ -1057,7 +1057,7 @@ This class transmits data through the UART. - + @@ -1069,7 +1069,7 @@ This class transmits data through the UART.
    uart numberUART number TX pin RX pin RTS pin
    uart0UART0 pin39 pin38
    uart1UART1 pin22 pin23
    uart2UART2 pin18 pin17 pin23
    uart3UART3 pin29 pin28
    - + @@ -1079,7 +1079,7 @@ This class transmits data through the UART. - + @@ -1087,7 +1087,7 @@ This class transmits data through the UART. - + @@ -1099,7 +1099,7 @@ This class transmits data through the UART.
    uart numberUART number TX pin RX pin RTS pin
    uart0UART0 pin27 pin26
    uart1UART1 pin20 pin19
    - + @@ -1109,7 +1109,7 @@ This class transmits data through the UART. - + @@ -1117,7 +1117,7 @@ This class transmits data through the UART. - + @@ -1129,7 +1129,7 @@ This class transmits data through the UART.
    uart numberUART number TX pin RX pin RTS pin
    uart1UART1 pin35 pin34
    uart2UART2 pin28 pin27
    - + @@ -1139,7 +1139,7 @@ This class transmits data through the UART. - + @@ -1151,7 +1151,7 @@ This class transmits data through the UART.
    uart numberUART number TX pin RX pin RTS pin
    uart0UART0 pin21 pin22
    - + @@ -1161,7 +1161,7 @@ This class transmits data through the UART. - + @@ -1173,7 +1173,7 @@ This class transmits data through the UART.
    uart numberUART number TX pin RX pin RTS pin
    uart0UART0 pin22 pin21
    - + @@ -1183,7 +1183,7 @@ This class transmits data through the UART. - + @@ -1191,7 +1191,7 @@ This class transmits data through the UART. - + @@ -1199,7 +1199,7 @@ This class transmits data through the UART. - + @@ -1207,7 +1207,7 @@ This class transmits data through the UART. - + @@ -1219,7 +1219,7 @@ This class transmits data through the UART.
    uart numberUART number TX pin RX pin RTS pin
    uart0UART0 pin23 pin22
    uart1UART1 pin27 pin28
    uart2UART2 pin35 pin34 pin36
    uart4UART4 pin36 pin37
    - + @@ -1229,7 +1229,7 @@ This class transmits data through the UART. - + @@ -1237,7 +1237,7 @@ This class transmits data through the UART. - + @@ -1245,7 +1245,7 @@ This class transmits data through the UART. - + -- Gitee From 26c8714ec209d4f3fa96bc40c08a853abcff9ba3 Mon Sep 17 00:00:00 2001 From: "joey.zhou" <2775152163@qq.com> Date: Tue, 18 Mar 2025 11:00:09 +0800 Subject: [PATCH 3/4] uart_adc --- en/peripherals/machine.UART.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/peripherals/machine.UART.md b/en/peripherals/machine.UART.md index 7cbe4b6..1364012 100644 --- a/en/peripherals/machine.UART.md +++ b/en/peripherals/machine.UART.md @@ -1372,7 +1372,7 @@ This method disables the UART.

    Return value Description:

    -

    Returns an integer value on success0Returns an integer value on failure-1

    +

    Returns an integer value on success0,Returns an integer value on failure-1

    Example:

    from machine import UART
    uart1 = UART(UART.UART1, 115200, 8, 0, 1, 0)
    art1.control_485(UART.GPIO24, 1)
    -- Gitee From fcf279277b74510e9a28194f0db41a9f509b3f99 Mon Sep 17 00:00:00 2001 From: "joey.zhou" <2775152163@qq.com> Date: Tue, 18 Mar 2025 11:07:56 +0800 Subject: [PATCH 4/4] uart_adc --- en/peripherals/machine.UART.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/en/peripherals/machine.UART.md b/en/peripherals/machine.UART.md index 1364012..f699449 100644 --- a/en/peripherals/machine.UART.md +++ b/en/peripherals/machine.UART.md @@ -147,7 +147,7 @@ This class transmits data through the UART. - + @@ -185,7 +185,7 @@ This class transmits data through the UART. - + -- Gitee
    uart numberUART number TX pin RX pin RTS pin
    uart0UART0 pin39 pin38
    uart1UART1 pin29 pin28
    uart2UART2 pin18 pin17
    UART0(The use of other uarts is recommended.)UART0(The use of other Uarts is recommended.) pin12 pin11
    UART0(The use of other uarts is recommended.)UART0(The use of other Uarts is recommended.) pin12 pin11