mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-22 05:19:03 +00:00
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:
committed by
Ron Evans
parent
d266e44bc5
commit
4397152108
@@ -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,
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user