mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-15 12:23:41 +00:00
fix pullups not available on fe310
This commit is contained in:
@@ -9,7 +9,7 @@ func configurePinOut(p PinOutput) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func configurePinInputPulldown(p PinInput) {
|
func configurePinInputPulldown(p PinInput) {
|
||||||
configurePin(p, machine.PinInputPulldown)
|
configurePin(p, pulldown) // some chips do not have pull down, in which case pulldown==machine.PinInput.
|
||||||
}
|
}
|
||||||
|
|
||||||
func configurePinInput(p PinInput) {
|
func configurePinInput(p PinInput) {
|
||||||
@@ -17,7 +17,7 @@ func configurePinInput(p PinInput) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func configurePinInputPullup(p PinInput) {
|
func configurePinInputPullup(p PinInput) {
|
||||||
configurePin(p, machine.PinInputPullup)
|
configurePin(p, pullup) // some chips do not have pull up, in which case pullup==machine.PinInput.
|
||||||
}
|
}
|
||||||
|
|
||||||
func pinIsNoPin(a any) bool {
|
func pinIsNoPin(a any) bool {
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
//go:build baremetal && fe310
|
||||||
|
|
||||||
|
package legacy
|
||||||
|
|
||||||
|
import "machine"
|
||||||
|
|
||||||
|
const (
|
||||||
|
pulldown = machine.PinInput
|
||||||
|
pullup = machine.PinInput
|
||||||
|
)
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
//go:build baremetal && !fe310
|
||||||
|
|
||||||
|
package legacy
|
||||||
|
|
||||||
|
import "machine"
|
||||||
|
|
||||||
|
const (
|
||||||
|
pulldown = machine.PinInputPulldown
|
||||||
|
pullup = machine.PinInputPullup
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user