Skip to content

Commit d7aca52

Browse files
authored
Merge pull request #36 from manchoz/opta_rx_rs485
Manage RS485_RX pull-up for Opta
2 parents 88fb68f + 599eb05 commit d7aca52

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

.github/workflows/compile-examples.yml

+3
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ jobs:
6161
- fqbn: arduino:mbed_portenta:envie_m7
6262
platforms: |
6363
- name: arduino:mbed_portenta
64+
- fqbn: arduino:mbed_opta:opta
65+
platforms: |
66+
- name: arduino:mbed_opta
6467
6568
steps:
6669
- name: Checkout repository

library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ sentence=Enables sending and receiving data using the RS-485 standard with RS-48
66
paragraph=This library supports the Maxim Integrated MAX3157 and equivalent chipsets.
77
category=Communication
88
url=http://www.arduino.cc/en/Reference/ArduinoRS485
9-
architectures=samd,mbed_portenta
9+
architectures=samd,mbed_portenta,mbed_opta
1010
includes=ArduinoRS485.h

src/RS485.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,12 @@ void RS485Class::begin(unsigned long baudrate, uint16_t config, int predelay, in
7676

7777
_transmisionBegun = false;
7878

79+
#if defined(ARDUINO_OPTA)
80+
auto _opta_uart = static_cast<UART *>(_serial);
81+
_opta_uart->begin(baudrate, config, true);
82+
#else
7983
_serial->begin(baudrate, config);
84+
#endif
8085
}
8186

8287
void RS485Class::end()

0 commit comments

Comments
 (0)