4 ms·
This seems very interesting to me, but is it any kind of big deal?
by hwestiii 5y ago
This seems very interesting to me, but is it any kind of big deal?
- analog31 5y agoI use some of these chips, and took a random stab at one of the files to see what it contained, a SPI-bus i/o expander. It looks pretty useful. I usually write my own drivers, but that gets to be more and more effort if I want to make use of more sophisticated functions, plus I can make mistakes by mis-reading the datasheet or just counting wrong. I might be discouraged from using a function that I don't quite understand, but a pre-written driver might get me past that. Note that these "drivers" are routines that talk to fairly low level hardware ports of a Linux computer, and I might modify the code for use on a microcontroller without an OS.
- sethherr 5y agoWhy are you writing your own drivers?
- analog31 5y agoGood question. Maybe I'm unclear on the definition of "driver." I've used the term to describe the code that exercises the functions of the chip but provides human readable function headers. It's usually not ridiculously hard, interpreting things like register bit definitions and timing diagrams. And in the absence of published code, I'd have been on the hook to write it myself anyway. Often, talking to something like an ADC through a SPI port on a microcontroller might be 10 or 20 lines of code.