mirror of
https://github.com/kidoman/embd
synced 2025-07-03 03:47:33 +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:
parent
5065e49386
commit
7cffa7f1e5
4 changed files with 7 additions and 7 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue