diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index c692243..3dfa684 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -61,6 +61,9 @@ jobs: - fqbn: arduino:mbed_portenta:envie_m7 platforms: | - name: arduino:mbed_portenta + - fqbn: arduino:mbed_opta:opta + platforms: | + - name: arduino:mbed_opta steps: - name: Checkout repository diff --git a/library.properties b/library.properties index 2883b58..879479d 100644 --- a/library.properties +++ b/library.properties @@ -1,10 +1,10 @@ name=ArduinoRS485 -version=1.0.4 +version=1.0.5 author=Arduino maintainer=Arduino sentence=Enables sending and receiving data using the RS-485 standard with RS-485 shields, like the MKR 485 Shield. paragraph=This library supports the Maxim Integrated MAX3157 and equivalent chipsets. category=Communication url=http://www.arduino.cc/en/Reference/ArduinoRS485 -architectures=* +architectures=samd,mbed_portenta,mbed_opta includes=ArduinoRS485.h diff --git a/src/RS485.cpp b/src/RS485.cpp index 20a6451..5c8842d 100644 --- a/src/RS485.cpp +++ b/src/RS485.cpp @@ -76,7 +76,12 @@ void RS485Class::begin(unsigned long baudrate, uint16_t config, int predelay, in _transmisionBegun = false; +#if defined(ARDUINO_OPTA) + auto _opta_uart = static_cast(_serial); + _opta_uart->begin(baudrate, config, true); +#else _serial->begin(baudrate, config); +#endif } void RS485Class::end()