-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
WiringPi/wiringPi/wiringPiSPI.c
Line 112 in 8960cc9
| snprintf (spiDev, 31, "/dev/spidev0.%d", channel) ; |
Spidev0 is hard coded, but for example the devterm with cm4 uses spidev4 for its printer. In the past, the creators of devterm offered a custom version of wiringpi because of this, but if there would be a optional parameter to the spi functions, to select different spidev's, then you could use a unmodified version of wiringpi.
The modification needed for this shouldn't be that much of work, first remove the hardcoded spidev and make it also a variable, like the channel, get the var from optional function parameter, and last, make the spiFds array bigger or better, make it a two dimensional array.
This would really help in porting a new os to the Devterm without making custom wiringpi versions for everything.
Thx in advance