mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-13 07:23:39 +00:00
maixbit (gpio): fix pin configuration
This commit is contained in:
@@ -80,6 +80,9 @@ func (p Pin) Configure(config PinConfig) {
|
|||||||
return // The pin is not configured as GPIO or GPIOHS.
|
return // The pin is not configured as GPIO or GPIOHS.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Configure pin.
|
||||||
|
kendryte.FPIOA.IO[uint8(p)].SetBits(kendryte.FPIOA_IO_OE_EN | kendryte.FPIOA_IO_IE_EN | kendryte.FPIOA_IO_ST | kendryte.FPIOA_IO_DS_Msk)
|
||||||
|
|
||||||
switch config.Mode {
|
switch config.Mode {
|
||||||
case PinInput:
|
case PinInput:
|
||||||
p.setFPIOAIOPull(fpioaPullNone)
|
p.setFPIOAIOPull(fpioaPullNone)
|
||||||
|
|||||||
Reference in New Issue
Block a user