maixbit: support both GPIO and GPIOHS controllers

This commit is contained in:
Yannis Huber
2020-06-19 17:35:36 +02:00
committed by Ron Evans
parent 804dc8b1f9
commit 53c83fa445
4 changed files with 104 additions and 290 deletions
+4 -1
View File
@@ -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{})
}