Added missing operator bool to USBSerial. Note. Its odd that I'd not spotted this was missing as I added it to HardwareSerial ages ago

This commit is contained in:
Roger Clark 2014-12-21 18:08:16 +11:00
parent 98c772079e
commit c2d5ac0a1f
1 changed files with 2 additions and 0 deletions

View File

@ -49,6 +49,8 @@ public:
void begin(unsigned long, uint8_t);
void end(void);
operator bool() { return true; } // Roger Clark. This is needed because in cardinfo.ino it does if (!Serial) . It seems to be a work around for the Leonardo that we needed to implement just to be compliant with the API
virtual int available(void);// Changed to virtual
uint32 read(void *buf, uint32 len);