feature: some additional changes to drivers.Pin HAL for clarity and readability.

Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
deadprogram
2025-09-20 08:29:32 +02:00
parent 97ed81556b
commit d224b5d648
33 changed files with 139 additions and 171 deletions
+5 -5
View File
@@ -3,7 +3,7 @@ package legacy
import (
"errors"
"tinygo.org/x/drivers/internal/pin"
"tinygo.org/x/drivers"
)
// ConfigurePinOut is a legacy function used to configure pins as outputs.
@@ -11,7 +11,7 @@ import (
// Deprecated: Do not configure pins in drivers.
// This is a legacy feature and should only be used by drivers that
// previously configured pins in initialization to avoid breaking users.
func ConfigurePinOut(po pin.Output) {
func ConfigurePinOut(po drivers.PinOutput) {
configurePinOut(po)
}
@@ -20,7 +20,7 @@ func ConfigurePinOut(po pin.Output) {
// Deprecated: Do not configure pins in drivers.
// This is a legacy feature and should only be used by drivers that
// previously configured pins in initialization to avoid breaking users.
func ConfigurePinInputPulldown(pi pin.Input) {
func ConfigurePinInputPulldown(pi drivers.PinInput) {
configurePinInputPulldown(pi)
}
@@ -29,7 +29,7 @@ func ConfigurePinInputPulldown(pi pin.Input) {
// Deprecated: Do not configure pins in drivers.
// This is a legacy feature and should only be used by drivers that
// previously configured pins in initialization to avoid breaking users.
func ConfigurePinInput(pi pin.Input) {
func ConfigurePinInput(pi drivers.PinInput) {
configurePinInput(pi)
}
@@ -38,7 +38,7 @@ func ConfigurePinInput(pi pin.Input) {
// Deprecated: Do not configure pins in drivers.
// This is a legacy feature and should only be used by drivers that
// previously configured pins in initialization to avoid breaking users.
func ConfigurePinInputPullup(pi pin.Input) {
func ConfigurePinInputPullup(pi drivers.PinInput) {
configurePinInputPullup(pi)
}