From 75f82eff6a720d0db26310b83b07f4dfc1f19a3e Mon Sep 17 00:00:00 2001 From: Giampaolo Mancini Date: Tue, 10 Jan 2023 14:37:12 +0100 Subject: [PATCH 1/3] Manage RS485_RX pull-up for Opta --- src/RS485.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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() From 372825dda11a5d53c8ce526649c584f80e12c160 Mon Sep 17 00:00:00 2001 From: Giampaolo Mancini Date: Tue, 10 Jan 2023 15:47:34 +0100 Subject: [PATCH 2/3] Add CI for Arduino Opta --- .github/workflows/compile-examples.yml | 3 +++ 1 file changed, 3 insertions(+) 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 From 599eb0521d512e5db58701d3a2657eb47394159c Mon Sep 17 00:00:00 2001 From: Giampaolo Mancini Date: Tue, 10 Jan 2023 17:18:33 +0100 Subject: [PATCH 3/3] Add Opta to architectures --- library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.properties b/library.properties index 283ad99..b450a32 100644 --- a/library.properties +++ b/library.properties @@ -6,5 +6,5 @@ sentence=Enables sending and receiving data using the RS-485 standard with RS-48 paragraph=This library supports the Maxim Integrated MAX3157 and equivalent chipsets. category=Communication url=http://www.arduino.cc/en/Reference/ArduinoRS485 -architectures=samd,mbed_portenta +architectures=samd,mbed_portenta,mbed_opta includes=ArduinoRS485.h