Closed jonseymour closed 7 years ago
@jonseymour that's awesome. Would you please consider a little thing in your PR:
Thanks
@nqv I've made the changes. I am happy to merge these tweaks into the earlier commits with a rebase if you would prefer.
Thank you very much.
In some POSIX environments, particularly Linux, additional ioctl's are required to enable RS485 support in the underlying device drivers. For example, to enable use of a GPIO pin to control the transmit state of a RS485 transceiver.
In this series, we crib the support for RS485 from another golang serial library to add this support to this library.
The support is disabled by default and enabled by setting RS485.Enable = true in the modified Config structure.
This has been tested on a BeagleBone Black Rev C, running Debian 8.7 that had the omap_uart driver (source: tty/serial/omap-serial.c) built in. The hardware was a Mikroe Click RS485 transceiver.