elixir-circuits / circuits_uart

Discover and use UARTs and serial ports in Elixir
Apache License 2.0
188 stars 48 forks source link

Skip setting RS485 if there is no user configuration #139

Closed jjcarstens closed 1 year ago

jjcarstens commented 1 year ago

Previously we would try to set RS485 config if we were able to read it assuming that if you can read, you can set. However, its been discovered that Allwinner chips can return an RS485 configuration read but still fail to set.

This changes the logic to only attempt to set the RS485 config if the user has provided some config values and skip trying to set settings we just read in but don't actually need to be changed.

fhunleth commented 1 year ago

Thanks!