Pin HAL to break dependency of drivers from TinyGo's machine package

This commit is contained in:
Yurii Soldak
2025-09-21 04:38:21 +02:00
parent 3fa08112db
commit c6d83b783f
15 changed files with 328 additions and 88 deletions
+18
View File
@@ -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
}