Loading...
Searching...
No Matches
SerialUART.h File Reference

Serial1, Serial2: the RP2040 hardware UARTs on the header pins. More...

#include "api/HardwareSerial.h"
#include "api/RingBuffer.h"
#include "hardware/uart.h"
#include "pico/critical_section.h"

Go to the source code of this file.

Classes

class  SerialUARTClass
 Serial port on one RP2040 UART; sketches use Serial1 and Serial2. More...

Variables

SerialUARTClass Serial1
 UART0 on D1 (TX) and D0 (RX).
SerialUARTClass Serial2
 UART1 on D4 (TX) and D5 (RX).

Detailed Description

Serial1, Serial2: the RP2040 hardware UARTs on the header pins.

Pins come from pins_arduino.h (PIN_SERIAL1_TX/RX, PIN_SERIAL2_TX/RX). Received bytes are buffered by an interrupt; writes block until queued in the 32-byte hardware FIFO. Either core may use a port, whichever core called begin(); bytes written from both cores at once can interleave.