machine/samd21: switch UART to use new pin configuration

This allows all possible UART pin configurations to be used and avoids
some tricky configuration.
This commit is contained in:
Ayke van Laethem
2019-09-30 16:44:21 +02:00
committed by Ron Evans
parent d266e44bc5
commit 4397152108
6 changed files with 56 additions and 64 deletions
+6 -6
View File
@@ -68,10 +68,10 @@ const (
// UART1 on the Arduino Nano 33 connects to the onboard NINA-W102 WiFi chip.
var (
UART1 = UART{Bus: sam.SERCOM5_USART,
UART1 = UART{
Buffer: NewRingBuffer(),
Mode: PinSERCOMAlt,
IRQVal: sam.IRQ_SERCOM5,
Bus: sam.SERCOM5_USART,
SERCOM: 5,
}
)
@@ -88,10 +88,10 @@ func handleUART1() {
// UART2 on the Arduino Nano 33 connects to the normal TX/RX pins.
var (
UART2 = UART{Bus: sam.SERCOM3_USART,
UART2 = UART{
Buffer: NewRingBuffer(),
Mode: PinSERCOMAlt,
IRQVal: sam.IRQ_SERCOM3,
Bus: sam.SERCOM3_USART,
SERCOM: 3,
}
)