ArduinoRS485 icon indicating copy to clipboard operation
ArduinoRS485 copied to clipboard

Library does not support SAMD21 M0 boards

Open robomike opened this issue 4 years ago • 1 comments

Arduino: 1.8.12 (Linux), Board: "Arduino M0"

In file included from /root/Arduino/libraries/ArduinoRS485/src/RS485.cpp:20:0: /root/Arduino/libraries/ArduinoRS485/src/RS485.h:35:30: error: 'A6' was not declared in this scope #define RS845_DEFAULT_DE_PIN A6 ^ /root/Arduino/libraries/ArduinoRS485/src/RS485.cpp:169:62: note: in expansion of macro 'RS845_DEFAULT_DE_PIN' RS485Class RS485(SERIAL_PORT_HARDWARE, RS485_DEFAULT_TX_PIN, RS845_DEFAULT_DE_PIN, RS845_DEFAULT_RE_PIN); ^~~~~~~~~~~~~~~~~~~~ /root/Arduino/libraries/ArduinoRS485/src/RS485.h:35:30: note: suggested alternative: 'A5' #define RS845_DEFAULT_DE_PIN A6 ^ /root/Arduino/libraries/ArduinoRS485/src/RS485.cpp:169:62: note: in expansion of macro 'RS845_DEFAULT_DE_PIN' RS485Class RS485(SERIAL_PORT_HARDWARE, RS485_DEFAULT_TX_PIN, RS845_DEFAULT_DE_PIN, RS845_DEFAULT_RE_PIN); ^~~~~~~~~~~~~~~~~~~~

robomike avatar Feb 29 '20 18:02 robomike

Thanks for your report @robomike. There was a related fix for the Arduino Zero board in https://github.com/arduino-libraries/ArduinoRS485/pull/34. That fix targeted the Zero board exclusively, but expanding the preprocessor conditional code to include the ARDUINO_SAM_ZERO board definition macro of the Arduino M0 board (as well as the M0 Pro) should provide compatibility with this board as well.

per1234 avatar Jan 13 '23 08:01 per1234