mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-09 05:23:40 +00:00
maixbit: support both GPIO and GPIOHS controllers
This commit is contained in:
@@ -99,8 +99,11 @@ func handleInterrupt() {
|
||||
|
||||
// initPeripherals configures periperhals the way the runtime expects them.
|
||||
func initPeripherals() {
|
||||
// Enable APB0 clock.
|
||||
kendryte.SYSCTL.CLK_EN_CENT.SetBits(kendryte.SYSCTL_CLK_EN_CENT_APB0_CLK_EN)
|
||||
|
||||
machine.FPIOA0.Init()
|
||||
// Enable FPIOA peripheral.
|
||||
kendryte.SYSCTL.CLK_EN_PERI.SetBits(kendryte.SYSCTL_CLK_EN_PERI_FPIOA_CLK_EN)
|
||||
|
||||
machine.UART0.Configure(machine.UARTConfig{})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user