mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-09-12 17:49:29 +00:00
feature: some additional changes to drivers.Pin HAL for clarity and readability.
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
+2
-3
@@ -12,13 +12,12 @@ import (
|
||||
|
||||
"tinygo.org/x/drivers"
|
||||
"tinygo.org/x/drivers/internal/legacy"
|
||||
"tinygo.org/x/drivers/internal/pin"
|
||||
)
|
||||
|
||||
// Device wraps MCP2515 SPI CAN Module.
|
||||
type Device struct {
|
||||
spi SPI
|
||||
cs drivers.PinOutput
|
||||
cs drivers.PinOutputFunc
|
||||
msg *CANMsg
|
||||
mcpMode byte
|
||||
configurePins func()
|
||||
@@ -38,7 +37,7 @@ const (
|
||||
)
|
||||
|
||||
// New returns a new MCP2515 driver. Pass in a fully configured SPI bus.
|
||||
func New(b drivers.SPI, csPin pin.Output) *Device {
|
||||
func New(b drivers.SPI, csPin drivers.PinOutput) *Device {
|
||||
d := &Device{
|
||||
spi: SPI{
|
||||
bus: b,
|
||||
|
||||
Reference in New Issue
Block a user