We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a0c905 commit a1714dcCopy full SHA for a1714dc
src/machine/board_lorae5.go
@@ -56,6 +56,18 @@ var (
56
}
57
DefaultUART = UART0
58
59
+ // Since we treat UART1 as zero, let's also call it by the real name
60
+ UART1 = UART0
61
+
62
+ // UART2
63
+ UART2 = &_UART2
64
+ _UART2 = UART{
65
+ Buffer: NewRingBuffer(),
66
+ Bus: stm32.USART2,
67
+ TxAltFuncSelector: AF7_USART1_2,
68
+ RxAltFuncSelector: AF7_USART1_2,
69
+ }
70
71
// I2C Busses
72
I2C1 = &I2C{
73
Bus: stm32.I2C1,
@@ -72,4 +84,5 @@ var (
84
func init() {
85
// Enable UARTs Interrupts
74
86
UART0.Interrupt = interrupt.New(stm32.IRQ_USART1, _UART0.handleInterrupt)
87
+ UART2.Interrupt = interrupt.New(stm32.IRQ_USART2, _UART2.handleInterrupt)
75
88
0 commit comments