chore: update all SPI usage to use either *machine.SPI or drivers.SPI to accomodate recent switch in machine package

Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
deadprogram
2025-03-11 18:27:15 +01:00
committed by Ron Evans
parent 6e04decf19
commit 156d6e7c9c
18 changed files with 33 additions and 28 deletions
+4 -2
View File
@@ -4,6 +4,8 @@ package max6675
import (
"errors"
"machine"
"tinygo.org/x/drivers"
)
// ErrThermocoupleOpen is returned when the thermocouple input is open.
@@ -11,14 +13,14 @@ import (
var ErrThermocoupleOpen = errors.New("thermocouple input open")
type Device struct {
bus machine.SPI
bus drivers.SPI
cs machine.Pin
}
// Create a new Device to read from a MAX6675 thermocouple.
// Pins must be configured before use. Frequency for SPI
// should be 4.3MHz maximum.
func NewDevice(bus machine.SPI, cs machine.Pin) *Device {
func NewDevice(bus drivers.SPI, cs machine.Pin) *Device {
return &Device{
bus: bus,
cs: cs,