You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/api/serial.rst
+18-19Lines changed: 18 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,18 +41,18 @@ ESP32-H2 2 0
41
41
ESP32-P4 5 1
42
42
========= ======== ========
43
43
44
-
**Note:**
44
+
**Note:**
45
45
* HP (High-Performance) UARTs are the standard UART peripherals
46
46
* LP (Low-Power) UARTs are available on some SoCs for ultra-low power applications
47
47
* UART0 is typically used for programming and debug output (Serial Monitor)
48
48
* Additional UARTs (Serial1, Serial2, etc.) are available for general-purpose communication, including LP UARTs when available. The ESP32 Arduino Core automatically creates HardwareSerial objects for all available UARTs:
49
-
49
+
50
50
* ``Serial0`` (or ``Serial``) - UART0 (HP UART, typically used for programming and debug output)
51
51
* ``Serial1``, ``Serial2``, etc. - Additional HP UARTs (numbered sequentially)
52
52
* Additional Serial objects - LP UARTs, when available (numbered after HP UARTs)
53
-
53
+
54
54
**Example:** The ESP32-C6 has 2 HP UARTs and 1 LP UART. The Arduino Core creates ``Serial0`` and ``Serial1`` (HP UARTs) plus ``Serial2`` (LP UART) HardwareSerial objects.
55
-
55
+
56
56
**Important:** LP UARTs can be used as regular UART ports, but they have fixed GPIO pins for RX, TX, CTS, and RTS. It is not possible to change the pins for LP UARTs using ``setPins()``.
57
57
58
58
Arduino-ESP32 Serial API
@@ -68,10 +68,10 @@ Initializes the Serial port with the specified baud rate and configuration.
* ``baud`` - Baud rate (bits per second). Common values: 9600, 115200, 230400, etc.
71
-
71
+
72
72
**Special value:** ``0`` enables baud rate detection (ESP32, ESP32-S2 only). The function will attempt to detect the baud rate for up to ``timeout_ms`` milliseconds. See the :ref:`Baud Rate Detection Example <baud-rate-detection-example>` for usage details.
73
73
* ``config`` - Serial configuration (data bits, parity, stop bits):
74
-
74
+
75
75
* ``SERIAL_8N1`` - 8 data bits, no parity, 1 stop bit (default)
76
76
* ``SERIAL_8N2`` - 8 data bits, no parity, 2 stop bits
77
77
* ``SERIAL_8E1`` - 8 data bits, even parity, 1 stop bit
@@ -98,10 +98,10 @@ Initializes the Serial port with the specified baud rate and configuration.
98
98
99
99
// Basic initialization with default pins
100
100
Serial.begin(115200);
101
-
101
+
102
102
// Initialize with custom pins
103
103
Serial1.begin(9600, SERIAL_8N1, 4, 5);
104
-
104
+
105
105
// Initialize with baud rate detection (ESP32, ESP32-S2 only)
0 commit comments