1
0
Fork 0
mirror of https://github.com/kidoman/embd synced 2025-07-03 11:57:38 +02:00

On some platform spidev devices has a name whos minor is > 255. Use an int instead of byte to set ID

This commit is contained in:
Claes Jakobsson 2015-07-10 18:58:07 +02:00
parent 5065e49386
commit 7cffa7f1e5
4 changed files with 7 additions and 7 deletions

View file

@ -41,7 +41,7 @@ type spiIOCTransfer struct {
type spiBus struct {
file *os.File
spiDevMinor byte
spiDevMinor int
channel byte
mode byte
@ -61,7 +61,7 @@ func spiIOCMessageN(n uint32) uint32 {
return (spiIOCMessage0 + (n * spiIOCIncrementor))
}
func NewSPIBus(spiDevMinor, mode, channel byte, speed, bpw, delay int, i func() error) embd.SPIBus {
func NewSPIBus(spiDevMinor int, mode, channel byte, speed, bpw, delay int, i func() error) embd.SPIBus {
return &spiBus{
spiDevMinor: spiDevMinor,
mode: mode,