Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
HardwareSerial Class Reference
Inheritance diagram for HardwareSerial:
Stream Print

Public Member Functions

 HardwareSerial (int uart_nr)
void begin (unsigned long baud)
void begin (unsigned long baud, uint8_t config)
void begin (unsigned long, uint8_t, uint8_t)
void end ()
void swap ()
int available (void) override
int peek (void) override
int read (void) override
int availableForWrite (void)
void flush (void) override
size_t write (uint8_t) override
size_t write (unsigned long n)
size_t write (long n)
size_t write (unsigned int n)
size_t write (int n)
 operator bool () const
void setDebugOutput (bool)
bool isTxEnabled (void)
bool isRxEnabled (void)
- Public Member Functions inherited from Stream
 Stream ()
void setTimeout (unsigned long timeout)
bool find (const char *target)
bool find (uint8_t *target)
bool find (const char *target, size_t length)
bool find (const uint8_t *target, size_t length)
bool find (char target)
bool findUntil (const char *target, const char *terminator)
bool findUntil (const uint8_t *target, const char *terminator)
bool findUntil (const char *target, size_t targetLen, const char *terminate, size_t termLen)
bool findUntil (const uint8_t *target, size_t targetLen, const char *terminate, size_t termLen)
long parseInt ()
float parseFloat ()
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)
- Public Member Functions inherited from Print
 Print ()
int getWriteError ()
void clearWriteError ()
size_t write (const char *str)
virtual size_t write (const uint8_t *buffer, size_t size)
size_t write (const char *buffer, size_t size)
size_t printf (const char *format,...) __attribute__((format(printf
size_t size_t print (const __FlashStringHelper *)
size_t print (const String &)
size_t print (const char[])
size_t print (char)
size_t print (unsigned char, int=10)
size_t print (int, int=10)
size_t print (unsigned int, int=10)
size_t print (long, int=10)
size_t print (unsigned long, int=10)
size_t print (double, int=2)
size_t print (const Printable &)
size_t println (const __FlashStringHelper *)
size_t println (const String &s)
size_t println (const char[])
size_t println (char)
size_t println (unsigned char, int=10)
size_t println (int, int=10)
size_t println (unsigned int, int=10)
size_t println (long, int=10)
size_t println (unsigned long, int=10)
size_t println (double, int=2)
size_t println (const Printable &)
size_t println (void)

Protected Member Functions

void _rx_complete_irq (char c)
void _tx_empty_irq (void)
- Protected Member Functions inherited from Stream
int timedRead ()
int timedPeek ()
int peekNextDigit ()
long parseInt (char skipChar)
float parseFloat (char skipChar)
- Protected Member Functions inherited from Print
void setWriteError (int err=1)

Protected Attributes

int _uart_nr
bool _written
- Protected Attributes inherited from Stream
unsigned long _timeout
unsigned long _startMillis


void uart_interrupt_handler (uart_t *uart)

Constructor & Destructor Documentation

HardwareSerial::HardwareSerial ( int  uart_nr)

Member Function Documentation

void HardwareSerial::_rx_complete_irq ( char  c)
void HardwareSerial::_tx_empty_irq ( void  )
int HardwareSerial::available ( void  )

Implements Stream.

int HardwareSerial::availableForWrite ( void  )
void HardwareSerial::begin ( unsigned long  baud)
void HardwareSerial::begin ( unsigned long  baud,
uint8_t  config 
void HardwareSerial::begin ( unsigned long  baud,
uint8_t  config,
uint8_t  mode 
void HardwareSerial::end ( void  )
void HardwareSerial::flush ( void  )

Implements Stream.

bool HardwareSerial::isRxEnabled ( void  )
bool HardwareSerial::isTxEnabled ( void  )
HardwareSerial::operator bool ( ) const
int HardwareSerial::peek ( void  )

Implements Stream.

int HardwareSerial::read ( void  )

Implements Stream.

void HardwareSerial::setDebugOutput ( bool  en)
void HardwareSerial::swap ( )
size_t HardwareSerial::write ( uint8_t  c)

Implements Print.

size_t HardwareSerial::write ( unsigned long  n)
size_t HardwareSerial::write ( long  n)
size_t HardwareSerial::write ( unsigned int  n)
size_t HardwareSerial::write ( int  n)

Friends And Related Function Documentation

void uart_interrupt_handler ( uart_t uart)

Member Data Documentation

cbuf* HardwareSerial::_rx_buffer
cbuf* HardwareSerial::_tx_buffer
uart_t* HardwareSerial::_uart
int HardwareSerial::_uart_nr
bool HardwareSerial::_written