libiio using standard /dev/ttyX uart as a device

Howdy all.  I've got some external serial boards talking on an rs485 bus (all in a Linux environment.)  Those boards have all kinds of functionality, but some of it maps to analog and digital inputs, along with analog and digital outputs.  I've done work before grabbing that info from user space via standard serial port open/read/write/close and making it available via sysfs for consumption.  I'm thinking it might be "better" to use the libiio framework instead of the more brute force (and more proprietary) way.  I've looked around and seen mention of the uart backend for libiio (via iiod I guess.)  There was also mention of tinyiiod, which might be another route.  I guess my main question is what is the best way to do this as far as interfacing to a standard Linux serial port via the iio framework?


Parents Reply Children