I'm writing (or, rather, copying from other people) some code for a Teensy 4.0/4.1, using PlatformIO.
Some known to be good code contains the following line:
ESCCMD_serial->clear( );
When I build it, I get the following error:
error: 'class HardwareSerial' has no member named 'clear'
I know the format is fine, since other similar lines, such as:
ESCCMD_serial->begin( ESCCMD_TLM_UART_SPEED );
compile just fine.
I did some Googling, and it turns out the Teensyduino version of Serial contains the 'clear' member (according to this page), while the Arduino version does not (according to this one).
So, it looks to me like PlatformIO is not using the correct (for me) version of HardwareSerial. Is it possible to get it to recognize that my Teensy needs a different version (yes, I selected the right board when I set up the project)?
Thanks.
Some known to be good code contains the following line:
ESCCMD_serial->clear( );
When I build it, I get the following error:
error: 'class HardwareSerial' has no member named 'clear'
I know the format is fine, since other similar lines, such as:
ESCCMD_serial->begin( ESCCMD_TLM_UART_SPEED );
compile just fine.
I did some Googling, and it turns out the Teensyduino version of Serial contains the 'clear' member (according to this page), while the Arduino version does not (according to this one).
So, it looks to me like PlatformIO is not using the correct (for me) version of HardwareSerial. Is it possible to get it to recognize that my Teensy needs a different version (yes, I selected the right board when I set up the project)?
Thanks.