Playing with Arduino
A page to record my playing with Arduino
HardwareSerial::operator bool()

Abstract

The HardwareSerial::operator bool() checks if the serial port is available or not.

Source Code

The HardwareSerial::operator bool() is defined in hardware/arduino/avr/cores/arduino/HardwareSerial.h as below.

1
operator bool() { return true; }

It always return true.

Version

Arduino AVR core 1.8.3

Last Update

May 15, 2021

inserted by FC2 system