kidoman / embd

Embedded Programming Framework in Go
http://embd.kidoman.io
MIT License
1.28k stars 156 forks source link

spiIOCMessageN(1) is not working on different kernel #51

Open morriswinkler opened 8 years ago

morriswinkler commented 8 years ago

Dear author, i have some trouble to make spi work, as i can see you are fetching IO controll numbers by using this conts's

spiIOCMessage0 = 1073769216 //0x40006B00 spiIOCIncrementor = 2097152 //0x200000

i do not know where you got them from, but i guess they are from the kernel spi driver, they simply don't work for me,

any sugestions on how to call the macro SPI_IOC_MESSAGE(N) in #include <linux/spi/spidev.h> directly ?

quinte17 commented 8 years ago

maybe the problem isn't the macro. I got the spi working because I changed the spiIOCTransfer type. My kernel-version: 4.1.15+ #830 I did an spi-driver for myself with yet another interface (ReadWriteCloser): https://github.com/quinte17/spi

maybe its working for you just to change the type?