Code: Select all
HardwareSerial Serial3(USART3); // compiles
HardwareSerial Serial3(PB_11, PB_10); // compiles
HardwareSerial Serial3(PB11, PB10); // error: call of overloaded 'HardwareSerial(int, int)' is ambiguous
Casting PB11 to an int lets it compile. PB11 is defined as 0 in variant.h.
digitalPinToPinName(PB11) and PB_11 both print as 27.
I've been looking through cores/arduino/HardwareSerial.cpp and HardwareSerial.h for the problem but haven't spotted it.
Code: Select all
HardwareSerial::HardwareSerial(uint32_t _rx, uint32_t _tx)
Code: Select all
HardwareSerial Serial3(0,1); //same as PB11, PB10 - error
HardwareSerial Serial3(2,1); // wrong values but compiles without error