diff options
author | Yannis Huber <[email protected]> | 2020-07-01 15:46:47 +0200 |
---|---|---|
committer | Ron Evans <[email protected]> | 2020-07-08 00:21:59 +0200 |
commit | f2fbd1dd7e054da3822ab90db4bcb3a435cc051e (patch) | |
tree | 7ee02df3ca4c74ea5deed0a04ac90d940ed36a21 | |
parent | 21a9aa810230f1e47514d3469abf413c63451871 (diff) | |
download | tinygo-f2fbd1dd7e054da3822ab90db4bcb3a435cc051e.tar.gz tinygo-f2fbd1dd7e054da3822ab90db4bcb3a435cc051e.zip |
maixbit (gpio): fix pin configuration
-rw-r--r-- | src/machine/machine_k210.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/machine/machine_k210.go b/src/machine/machine_k210.go index ca5f2d804..b92eab910 100644 --- a/src/machine/machine_k210.go +++ b/src/machine/machine_k210.go @@ -80,6 +80,9 @@ func (p Pin) Configure(config PinConfig) { 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 { case PinInput: p.setFPIOAIOPull(fpioaPullNone) |