bluepill: Enable stm32's USART2 for the board and map it to UART1 tinygo's device

This commit is contained in:
Olivier Fauchon
2020-09-16 01:29:10 +02:00
committed by Ron Evans
parent fcedf0beaa
commit 490e377bba
+5 -1
View File
@@ -65,11 +65,15 @@ var (
Buffer: NewRingBuffer(),
Bus: stm32.USART1,
}
UART1 = &UART0
UART1 = UART{
Buffer: NewRingBuffer(),
Bus: stm32.USART2,
}
)
func init() {
UART0.Interrupt = interrupt.New(stm32.IRQ_USART1, UART0.handleInterrupt)
UART1.Interrupt = interrupt.New(stm32.IRQ_USART2, UART1.handleInterrupt)
}
// SPI pins