mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-14 07:53:40 +00:00
machine: rename PinInputPullUp/PinInputPullDown
Some targets used capital PullUp/PullDown, while the documented standard is Pullup/Pulldown. This commit fixes this mismatch, while preserving compatibility with aliases that are marked deprecated.
This commit is contained in:
committed by
Ron Evans
parent
6e6666519c
commit
bc946f346d
@@ -23,11 +23,17 @@ type PinChange uint8
|
||||
// Pin modes.
|
||||
const (
|
||||
PinInput PinMode = iota
|
||||
PinInputPullUp
|
||||
PinInputPullDown
|
||||
PinInputPullup
|
||||
PinInputPulldown
|
||||
PinOutput
|
||||
)
|
||||
|
||||
// Deprecated: use PinInputPullup and PinInputPulldown instead.
|
||||
const (
|
||||
PinInputPullUp = PinInputPullup
|
||||
PinInputPullDown = PinInputPulldown
|
||||
)
|
||||
|
||||
// FPIOA internal pull resistors.
|
||||
const (
|
||||
fpioaPullNone fpioaPullMode = iota
|
||||
@@ -89,10 +95,10 @@ func (p Pin) Configure(config PinConfig) {
|
||||
case PinInput:
|
||||
p.setFPIOAIOPull(fpioaPullNone)
|
||||
input = true
|
||||
case PinInputPullUp:
|
||||
case PinInputPullup:
|
||||
p.setFPIOAIOPull(fpioaPullUp)
|
||||
input = true
|
||||
case PinInputPullDown:
|
||||
case PinInputPulldown:
|
||||
p.setFPIOAIOPull(fpioaPullDown)
|
||||
input = true
|
||||
case PinOutput:
|
||||
|
||||
Reference in New Issue
Block a user