mcci-catena / Catena-Arduino-Platform

Arduino platform library for MCCI Catena IoT Systems
MIT License
12 stars 11 forks source link

The Catena_Serial abstaction doesn't work with STM32 UsbSerial ports #319

Closed terrillmoore closed 2 years ago

terrillmoore commented 2 years ago

The abstraction (necessarily) exports cSerial::begin(unsigned long baudrate, uint16_t config). But STM32 UsbSerial doesn't have a two-parameter begin(). This results in a compile error when trying to create a cSerial<UsbSerial>.

Need to use template metaprogramming to detect the lack of a method and use UsbSerial::begin(baudrate) instead.