Pico-Arduino
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
pico_arduino::PicoSerialUART Class Reference

Serial Stream for a defined UART. By default we use the following pins: UART0 tx/rx = gp0/gp1; UART1 tx/rx = gp4/gp5;. More...

#include <PicoHardwareSerial.h>

Inheritance diagram for pico_arduino::PicoSerialUART:
arduino::HardwareSerial pico_arduino::StreamPrintf arduino::Stream arduino::Print

Public Member Functions

 PicoSerialUART (int uart_no)
 
virtual int available (void)
 
virtual int availableForWrite (void)
 
uint32_t baudRate ()
 
virtual void begin (unsigned long baudrate, int rxPin, int txPin, uint32_t config=SERIAL_8N1, bool invert=false, bool cts=false, bool rts=false)
 Initialization to output to UART. More...
 
virtual void begin (unsigned long baudrate, uint16_t config)
 
virtual void begin (unsigned long baudrate=PICO_DEFAULT_UART_BAUD_RATE)
 
virtual void end ()
 
virtual void flush (void)
 
virtual operator bool ()
 
virtual int peek (void)
 
virtual int read (void)
 
virtual size_t write (const uint8_t *buffer, size_t size)
 
virtual size_t write (uint8_t c)
 
- Public Member Functions inherited from arduino::HardwareSerial
size_t write (const char *buffer, size_t size)
 
size_t write (const char *str)
 
virtual size_t write (const uint8_t *buffer, size_t size)
 
virtual size_t write (uint8_t)=0
 
- Public Member Functions inherited from arduino::Stream
bool find (char target)
 
bool find (const char *target)
 
bool find (const char *target, size_t length)
 
bool find (const uint8_t *target)
 
bool find (const uint8_t *target, size_t length)
 
bool findUntil (const char *target, const char *terminator)
 
bool findUntil (const char *target, size_t targetLen, const char *terminate, size_t termLen)
 
bool findUntil (const uint8_t *target, const char *terminator)
 
bool findUntil (const uint8_t *target, size_t targetLen, const char *terminate, size_t termLen)
 
unsigned long getTimeout (void)
 
float parseFloat (LookaheadMode lookahead=SKIP_ALL, char ignore=NO_IGNORE_CHAR)
 
long parseInt (LookaheadMode lookahead=SKIP_ALL, char ignore=NO_IGNORE_CHAR)
 
size_t readBytes (char *buffer, size_t length)
 
size_t readBytes (uint8_t *buffer, size_t length)
 
size_t readBytesUntil (char terminator, char *buffer, size_t length)
 
size_t readBytesUntil (char terminator, uint8_t *buffer, size_t length)
 
String readString ()
 
String readStringUntil (char terminator)
 
void setTimeout (unsigned long timeout)
 
- Public Member Functions inherited from arduino::Print
void clearWriteError ()
 
int getWriteError ()
 
size_t print (char)
 
size_t print (const __FlashStringHelper *)
 
size_t print (const char[])
 
size_t print (const Printable &)
 
size_t print (const String &)
 
size_t print (double, int=2)
 
size_t print (int, int=DEC)
 
size_t print (long long, int=DEC)
 
size_t print (long, int=DEC)
 
size_t print (unsigned char, int=DEC)
 
size_t print (unsigned int, int=DEC)
 
size_t print (unsigned long long, int=DEC)
 
size_t print (unsigned long, int=DEC)
 
size_t println (char)
 
size_t println (const __FlashStringHelper *)
 
size_t println (const char[])
 
size_t println (const Printable &)
 
size_t println (const String &s)
 
size_t println (double, int=2)
 
size_t println (int, int=DEC)
 
size_t println (long long, int=DEC)
 
size_t println (long, int=DEC)
 
size_t println (unsigned char, int=DEC)
 
size_t println (unsigned int, int=DEC)
 
size_t println (unsigned long long, int=DEC)
 
size_t println (unsigned long, int=DEC)
 
size_t println (void)
 
size_t write (const char *buffer, size_t size)
 
size_t write (const char *str)
 
- Public Member Functions inherited from pico_arduino::StreamPrintf
 StreamPrintf (Stream *stream)
 
virtual int printf (const char *fmt,...)
 

Protected Member Functions

void readBuffer (bool refill=false)
 
void set_config (uint32_t config)
 
void setupDefaultRxTxPins ()
 
- Protected Member Functions inherited from arduino::Stream
int findMulti (struct MultiTarget *targets, int tCount)
 
float parseFloat (char ignore)
 
long parseInt (char ignore)
 
int peekNextDigit (LookaheadMode lookahead, bool detectDecimal)
 
int timedPeek ()
 
int timedRead ()
 
- Protected Member Functions inherited from arduino::Print
void setWriteError (int err=1)
 

Protected Attributes

uint baud_rate
 
RingBufferN< BUFFER_SIZE > buffer
 
bool open = false
 
int rx_pin
 
int tx_pin
 
uart_inst_t * uart
 
int uart_no
 
- Protected Attributes inherited from arduino::Stream
unsigned long _startMillis
 
unsigned long _timeout
 
- Protected Attributes inherited from pico_arduino::StreamPrintf
Streamstream_ptr
 

Detailed Description

Serial Stream for a defined UART. By default we use the following pins: UART0 tx/rx = gp0/gp1; UART1 tx/rx = gp4/gp5;.

Member Function Documentation

◆ begin()

virtual void pico_arduino::PicoSerialUART::begin ( unsigned long  baudrate,
int  rxPin,
int  txPin,
uint32_t  config = SERIAL_8N1,
bool  invert = false,
bool  cts = false,
bool  rts = false 
)
inlinevirtual

Initialization to output to UART.

Parameters
baudrate
rxPin
txPin
config
invert
cts
rts

The documentation for this class was generated from the following file: