1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

boards/samd20-xpro: add definition for UART on EXT2

We can't use PB13/PB12 which would be the 'standard' UART pins on
the -xpro EXT connectors since only SERCOM4 can map to those - and
that's already used on EXT1.

So use the adjacent PA08/PA09 with SERCOM0.
This commit is contained in:
Benjamin Valentin 2022-06-09 13:23:19 +02:00
parent c239f63cce
commit 43d752f677
2 changed files with 16 additions and 0 deletions

View File

@ -164,11 +164,26 @@ static const uart_conf_t uart_config[] = {
.flags = UART_FLAG_NONE,
.gclk_src = SAM0_GCLK_MAIN,
},
{ /* EXT2 */
.dev = &SERCOM0->USART,
.rx_pin = GPIO_PIN(PA,9),
.tx_pin = GPIO_PIN(PA,8),
#ifdef MODULE_PERIPH_UART_HW_FC
.rts_pin = GPIO_UNDEF,
.cts_pin = GPIO_UNDEF,
#endif
.mux = GPIO_MUX_C,
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0,
.flags = UART_FLAG_NONE,
.gclk_src = SAM0_GCLK_MAIN,
},
};
/* interrupt function name mapping */
#define UART_0_ISR isr_sercom3
#define UART_1_ISR isr_sercom4
#define UART_2_ISR isr_sercom0
#define UART_NUMOF ARRAY_SIZE(uart_config)
/** @} */

View File

@ -4834,6 +4834,7 @@ boards/samd20\-xpro/include/periph_conf\.h:[0-9]+: warning: Member TIMER_1_ISR \
boards/samd20\-xpro/include/periph_conf\.h:[0-9]+: warning: Member TIMER_NUMOF \(macro definition\) of file periph_conf\.h is not documented\.
boards/samd20\-xpro/include/periph_conf\.h:[0-9]+: warning: Member UART_0_ISR \(macro definition\) of file periph_conf\.h is not documented\.
boards/samd20\-xpro/include/periph_conf\.h:[0-9]+: warning: Member UART_1_ISR \(macro definition\) of file periph_conf\.h is not documented\.
boards/samd20\-xpro/include/periph_conf\.h:[0-9]+: warning: Member UART_2_ISR \(macro definition\) of file periph_conf\.h is not documented\.
boards/samd20\-xpro/include/periph_conf\.h:[0-9]+: warning: Member UART_NUMOF \(macro definition\) of file periph_conf\.h is not documented\.
boards/samd20\-xpro/include/periph_conf\.h:[0-9]+: warning: Member adc_channels\[\] \(variable\) of file periph_conf\.h is not documented\.
boards/samd20\-xpro/include/periph_conf\.h:[0-9]+: warning: Member i2c_config\[\] \(variable\) of file periph_conf\.h is not documented\.