I am in the process of rewriting a set of Python code into C. The code frequently uses SPI to communicate between a Raspberry Pi (master) and a motor driver board (slave). The Python code naturally uses the spidev
Python library. The only C/C++ wrapper that I found was this. Documentation is sparse, and it doesn't seem to be frequently maintained (that's just my initial impression). Has anyone used this library? Are there any other commonly used C/C++ wrappers?
\$\begingroup\$
\$\endgroup\$
3
-
\$\begingroup\$ I don't think this is an electrical engineering question. So need to do file IO to some linux device to perform SPI? And if this library can do it, so what if it is old? \$\endgroup\$– JustmeCommented Nov 13, 2022 at 20:03
-
\$\begingroup\$ @Justme I don't know if this library can do it. It's just the first thing that I found from a quick google search. My question is if anyone can recommend a C/C++ alternative to the commonly used spidev Python library. If this is the only C/C++ wrapper that exists, then I guess I'll have to use it. \$\endgroup\$– Anthony K.Commented Nov 13, 2022 at 20:37
-
\$\begingroup\$ But what for you need a library, since it just wraps some basic Linux device calls to provide a simple interface? The same thing can be done in your own code in about 50 lines. \$\endgroup\$– JustmeCommented Nov 13, 2022 at 21:19
Add a comment
|