mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-17 05:13:23 +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:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user