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

Support SPI minor devices >255 (PR #33)

This commit is contained in:
Thorsten von Eicken 2016-09-05 23:13:14 -07:00
parent 56cb934dbf
commit 6cfa481f30
6 changed files with 9 additions and 9 deletions

View file

@ -2,10 +2,10 @@ package embd
import "sync"
type spiBusFactory func(byte, byte, byte, int, int, int, func() error) SPIBus
type spiBusFactory func(int, byte, byte, int, int, int, func() error) SPIBus
type spiDriver struct {
spiDevMinor byte
spiDevMinor int
initializer func() error
busMap map[byte]SPIBus
@ -16,7 +16,7 @@ type spiDriver struct {
// NewSPIDriver returns a SPIDriver interface which allows control
// over the SPI bus.
func NewSPIDriver(spiDevMinor byte, sbf spiBusFactory, i func() error) SPIDriver {
func NewSPIDriver(spiDevMinor int, sbf spiBusFactory, i func() error) SPIDriver {
return &spiDriver{
spiDevMinor: spiDevMinor,
sbf: sbf,