mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-17 05:13:23 +00:00
Pin HAL to break dependency of drivers from TinyGo's machine package
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
//go:build !tinygo
|
||||
|
||||
// Generic no-op implementations of SafePin, SafePinInput and SafePinOutput.
|
||||
// It's custom implementation's responsibility to configure the pin modes correctly when needed.
|
||||
|
||||
package drivers
|
||||
|
||||
func SafePinInput(pin PinInput) PinInput {
|
||||
return pin
|
||||
}
|
||||
|
||||
func SafePinOutput(pin PinOutput) PinOutput {
|
||||
return pin
|
||||
}
|
||||
|
||||
func SafePin(pin Pin) Pin {
|
||||
return pin
|
||||
}
|
||||
Reference in New Issue
Block a user