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

boards/sam0: update sam0-based board to use hw fc

This commit is contained in:
dylad 2019-12-20 21:21:04 +01:00
parent bd06772980
commit fc9549b069
16 changed files with 173 additions and 53 deletions

View File

@ -40,6 +40,10 @@ static const uart_conf_t uart_config[] = {
.dev = &SERCOM5->USART,
.rx_pin = GPIO_PIN(PB,23), /* ARDUINO_PIN_13, RX Pin */
.tx_pin = GPIO_PIN(PB,22), /* ARDUINO_PIN_14, TX Pin */
#ifdef MODULE_SAM0_PERIPH_UART_HW_FC
.rts_pin = GPIO_UNDEF,
.cts_pin = GPIO_UNDEF,
#endif
.mux = GPIO_MUX_D,
.rx_pad = UART_PAD_RX_3,
.tx_pad = UART_PAD_TX_2,
@ -50,6 +54,10 @@ static const uart_conf_t uart_config[] = {
.dev = &SERCOM4->USART,
.rx_pin = GPIO_PIN(PA,15),
.tx_pin = GPIO_PIN(PA,12),
#ifdef MODULE_SAM0_PERIPH_UART_HW_FC
.rts_pin = GPIO_UNDEF,
.cts_pin = GPIO_UNDEF,
#endif
.mux = GPIO_MUX_D,
.rx_pad = UART_PAD_RX_3,
.tx_pad = UART_PAD_TX_0,

View File

@ -132,6 +132,10 @@ static const uart_conf_t uart_config[] = {
.dev = &SERCOM5->USART,
.rx_pin = GPIO_PIN(PB,23),
.tx_pin = GPIO_PIN(PB,22),
#ifdef MODULE_SAM0_PERIPH_UART_HW_FC
.rts_pin = GPIO_UNDEF,
.cts_pin = GPIO_UNDEF,
#endif
.mux = GPIO_MUX_D,
.rx_pad = UART_PAD_RX_3,
.tx_pad = UART_PAD_TX_2,
@ -142,6 +146,10 @@ static const uart_conf_t uart_config[] = {
.dev = &SERCOM0->USART,
.rx_pin = GPIO_PIN(PA,11),
.tx_pin = GPIO_PIN(PA,10),
#ifdef MODULE_SAM0_PERIPH_UART_HW_FC
.rts_pin = GPIO_UNDEF,
.cts_pin = GPIO_UNDEF,
#endif
.mux = GPIO_MUX_C,
.rx_pad = UART_PAD_RX_3,
.tx_pad = UART_PAD_TX_2,

View File

@ -40,6 +40,10 @@ static const uart_conf_t uart_config[] = {
.dev = &SERCOM5->USART,
.rx_pin = GPIO_PIN(PB,23), /* ARDUINO_PIN_13, RX Pin */
.tx_pin = GPIO_PIN(PB,22), /* ARDUINO_PIN_14, TX Pin */
#ifdef MODULE_SAM0_PERIPH_UART_HW_FC
.rts_pin = GPIO_UNDEF,
.cts_pin = GPIO_UNDEF,
#endif
.mux = GPIO_MUX_D,
.rx_pad = UART_PAD_RX_3,
.tx_pad = UART_PAD_TX_2,

View File

@ -61,8 +61,12 @@ static const tc32_conf_t timer_config[] = {
static const uart_conf_t uart_config[] = {
{ /* Virtual COM Port */
.dev = &SERCOM2->USART,
.rx_pin = GPIO_PIN(PA,25),
.tx_pin = GPIO_PIN(PA,24),
.rx_pin = GPIO_PIN(PA, 25),
.tx_pin = GPIO_PIN(PA, 24),
#ifdef MODULE_SAM0_PERIPH_UART_HW_FC
.rts_pin = GPIO_UNDEF,
.cts_pin = GPIO_UNDEF,
#endif
.mux = GPIO_MUX_D,
.rx_pad = UART_PAD_RX_3,
.tx_pad = UART_PAD_TX_2,

View File

@ -124,13 +124,17 @@ static const tc32_conf_t timer_config[] = {
*/
static const uart_conf_t uart_config[] = {
{
.dev = &SERCOM0->USART,
.rx_pin = GPIO_PIN(PA, 11), /* RX pin */
.tx_pin = GPIO_PIN(PA, 10), /* TX pin */
.mux = GPIO_MUX_C,
.rx_pad = UART_PAD_RX_3,
.tx_pad = UART_PAD_TX_2,
.flags = UART_FLAG_NONE,
.dev = &SERCOM0->USART,
.rx_pin = GPIO_PIN(PA, 11), /* RX pin */
.tx_pin = GPIO_PIN(PA, 10), /* TX pin */
#ifdef MODULE_SAM0_PERIPH_UART_HW_FC
.rts_pin = GPIO_UNDEF,
.cts_pin = GPIO_UNDEF,
#endif
.mux = GPIO_MUX_C,
.rx_pad = UART_PAD_RX_3,
.tx_pad = UART_PAD_TX_2,
.flags = UART_FLAG_NONE,
.gclk_src = GCLK_CLKCTRL_GEN_GCLK0,
}
};

View File

@ -138,6 +138,10 @@ static const uart_conf_t uart_config[] = {
.dev = &SERCOM3->USART,
.rx_pin = GPIO_PIN(PA,23),
.tx_pin = GPIO_PIN(PA,22),
#ifdef MODULE_SAM0_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,
@ -145,23 +149,31 @@ static const uart_conf_t uart_config[] = {
.gclk_src = GCLK_CLKCTRL_GEN_GCLK0
},
{ /* EXT1 */
.dev = &SERCOM4->USART,
.rx_pin = GPIO_PIN(PB,9),
.tx_pin = GPIO_PIN(PB,8),
.mux = GPIO_MUX_D,
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0,
.flags = UART_FLAG_NONE,
.dev = &SERCOM4->USART,
.rx_pin = GPIO_PIN(PB,9),
.tx_pin = GPIO_PIN(PB,8),
#ifdef MODULE_SAM0_PERIPH_UART_HW_FC
.rts_pin = GPIO_UNDEF,
.cts_pin = GPIO_UNDEF,
#endif
.mux = GPIO_MUX_D,
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0,
.flags = UART_FLAG_NONE,
.gclk_src = GCLK_CLKCTRL_GEN_GCLK0
},
{ /* EXT2/3 */
.dev = &SERCOM4->USART,
.rx_pin = GPIO_PIN(PB,11),
.tx_pin = GPIO_PIN(PB,10),
.mux = GPIO_MUX_D,
.rx_pad = UART_PAD_RX_3,
.tx_pad = UART_PAD_TX_2,
.flags = UART_FLAG_NONE,
.dev = &SERCOM4->USART,
.rx_pin = GPIO_PIN(PB,11),
.tx_pin = GPIO_PIN(PB,10),
#ifdef MODULE_SAM0_PERIPH_UART_HW_FC
.rts_pin = GPIO_UNDEF,
.cts_pin = GPIO_UNDEF,
#endif
.mux = GPIO_MUX_D,
.rx_pad = UART_PAD_RX_3,
.tx_pad = UART_PAD_TX_2,
.flags = UART_FLAG_NONE,
.gclk_src = GCLK_CLKCTRL_GEN_GCLK0
}
};

View File

@ -76,8 +76,12 @@ static const tc32_conf_t timer_config[] = {
static const uart_conf_t uart_config[] = {
{ /* Virtual COM Port */
.dev = &SERCOM2->USART,
.rx_pin = GPIO_PIN(PB,24),
.tx_pin = GPIO_PIN(PB,25),
.rx_pin = GPIO_PIN(PB, 24),
.tx_pin = GPIO_PIN(PB, 25),
#ifdef MODULE_SAM0_PERIPH_UART_HW_FC
.rts_pin = GPIO_UNDEF,
.cts_pin = GPIO_UNDEF,
#endif
.mux = GPIO_MUX_D,
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0,

View File

@ -66,6 +66,10 @@ static const uart_conf_t uart_config[] = {
.dev = &SERCOM3->USART,
.rx_pin = GPIO_PIN(PA,23),
.tx_pin = GPIO_PIN(PA,22),
#ifdef MODULE_SAM0_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,
@ -76,6 +80,10 @@ static const uart_conf_t uart_config[] = {
.dev = &SERCOM4->USART,
.rx_pin = GPIO_PIN(PB, 9),
.tx_pin = GPIO_PIN(PB, 8),
#ifdef MODULE_SAM0_PERIPH_UART_HW_FC
.rts_pin = GPIO_UNDEF,
.cts_pin = GPIO_UNDEF,
#endif
.mux = GPIO_MUX_D,
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0,

View File

@ -135,23 +135,31 @@ static const tc32_conf_t timer_config[] = {
*/
static const uart_conf_t uart_config[] = {
{
.dev = &SERCOM0->USART,
.rx_pin = GPIO_PIN(PA,5),
.tx_pin = GPIO_PIN(PA,4),
.mux = GPIO_MUX_D,
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0,
.flags = UART_FLAG_NONE,
.dev = &SERCOM0->USART,
.rx_pin = GPIO_PIN(PA,5),
.tx_pin = GPIO_PIN(PA,4),
#ifdef MODULE_SAM0_PERIPH_UART_HW_FC
.rts_pin = GPIO_UNDEF,
.cts_pin = GPIO_UNDEF,
#endif
.mux = GPIO_MUX_D,
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0,
.flags = UART_FLAG_NONE,
.gclk_src = GCLK_CLKCTRL_GEN_GCLK0
},
{
.dev = &SERCOM5->USART,
.rx_pin = GPIO_PIN(PA,23),
.tx_pin = GPIO_PIN(PA,22),
.mux = GPIO_MUX_D,
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0,
.flags = UART_FLAG_NONE,
.dev = &SERCOM5->USART,
.rx_pin = GPIO_PIN(PA,23),
.tx_pin = GPIO_PIN(PA,22),
#ifdef MODULE_SAM0_PERIPH_UART_HW_FC
.rts_pin = GPIO_UNDEF,
.cts_pin = GPIO_UNDEF,
#endif
.mux = GPIO_MUX_D,
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0,
.flags = UART_FLAG_NONE,
.gclk_src = GCLK_CLKCTRL_GEN_GCLK0
}
};

View File

@ -62,6 +62,10 @@ static const uart_conf_t uart_config[] = {
.dev = &SERCOM0->USART,
.rx_pin = GPIO_PIN(PA,5),
.tx_pin = GPIO_PIN(PA,4),
#ifdef MODULE_SAM0_PERIPH_UART_HW_FC
.rts_pin = GPIO_UNDEF,
.cts_pin = GPIO_UNDEF,
#endif
.mux = GPIO_MUX_D,
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0,

View File

@ -64,6 +64,10 @@ static const uart_conf_t uart_config[] = {
.dev = &SERCOM0->USART,
.rx_pin = GPIO_PIN(PA, 5),
.tx_pin = GPIO_PIN(PA, 4),
#ifdef MODULE_SAM0_PERIPH_UART_HW_FC
.rts_pin = GPIO_UNDEF,
.cts_pin = GPIO_UNDEF,
#endif
.mux = GPIO_MUX_D,
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0,

View File

@ -125,23 +125,31 @@ static const tc32_conf_t timer_config[] = {
*/
static const uart_conf_t uart_config[] = {
{
.dev = &SERCOM3->USART,
.rx_pin = GPIO_PIN(PA, 23),
.tx_pin = GPIO_PIN(PA, 22),
.mux = GPIO_MUX_C,
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0,
.flags = UART_FLAG_NONE,
.dev = &SERCOM3->USART,
.rx_pin = GPIO_PIN(PA, 23),
.tx_pin = GPIO_PIN(PA, 22),
#ifdef MODULE_SAM0_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 = GCLK_CLKCTRL_GEN_GCLK0,
},
{
.dev = &SERCOM4->USART,
.rx_pin = GPIO_PIN(PB, 9),
.tx_pin = GPIO_PIN(PB, 8),
.mux = GPIO_MUX_D,
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0,
.flags = UART_FLAG_NONE,
.dev = &SERCOM4->USART,
.rx_pin = GPIO_PIN(PB, 9),
.tx_pin = GPIO_PIN(PB, 8),
#ifdef MODULE_SAM0_PERIPH_UART_HW_FC
.rts_pin = GPIO_UNDEF,
.cts_pin = GPIO_UNDEF,
#endif
.mux = GPIO_MUX_D,
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0,
.flags = UART_FLAG_NONE,
.gclk_src = GCLK_CLKCTRL_GEN_GCLK0,
}
};

View File

@ -44,6 +44,10 @@ static const uart_conf_t uart_config[] = {
.dev = &SERCOM0->USART,
.rx_pin = GPIO_PIN(PA,9),
.tx_pin = GPIO_PIN(PA,10),
#ifdef MODULE_SAM0_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_2,
@ -54,6 +58,10 @@ static const uart_conf_t uart_config[] = {
.dev = &SERCOM5->USART,
.rx_pin = GPIO_PIN(PB,31),
.tx_pin = GPIO_PIN(PB,30),
#ifdef MODULE_SAM0_PERIPH_UART_HW_FC
.rts_pin = GPIO_UNDEF,
.cts_pin = GPIO_UNDEF,
#endif
.mux = GPIO_MUX_D,
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0_RTS_2_CTS_3,
@ -64,6 +72,10 @@ static const uart_conf_t uart_config[] = {
.dev = &SERCOM4->USART,
.rx_pin = GPIO_PIN(PB,13),
.tx_pin = GPIO_PIN(PB,14),
#ifdef MODULE_SAM0_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_2,
@ -74,6 +86,10 @@ static const uart_conf_t uart_config[] = {
.dev = &SERCOM1->USART,
.rx_pin = GPIO_PIN(PA,17),
.tx_pin = GPIO_PIN(PA,18),
#ifdef MODULE_SAM0_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_2,

View File

@ -40,6 +40,10 @@ static const uart_conf_t uart_config[] = {
.dev = &SERCOM5->USART,
.rx_pin = GPIO_PIN(PB,31), /* D0, RX Pin */
.tx_pin = GPIO_PIN(PB,30), /* D1, TX Pin */
#ifdef MODULE_SAM0_PERIPH_UART_HW_FC
.rts_pin = GPIO_UNDEF,
.cts_pin = GPIO_UNDEF,
#endif
.mux = GPIO_MUX_D,
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0_RTS_2_CTS_3,
@ -50,6 +54,10 @@ static const uart_conf_t uart_config[] = {
.dev = &SERCOM4->USART,
.rx_pin = GPIO_PIN(PB,13),
.tx_pin = GPIO_PIN(PB,14),
#ifdef MODULE_SAM0_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_2,
@ -60,6 +68,10 @@ static const uart_conf_t uart_config[] = {
.dev = &SERCOM0->USART,
.rx_pin = GPIO_PIN(PA,5),
.tx_pin = GPIO_PIN(PA,6),
#ifdef MODULE_SAM0_PERIPH_UART_HW_FC
.rts_pin = GPIO_UNDEF,
.cts_pin = GPIO_UNDEF,
#endif
.mux = GPIO_MUX_D,
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_2,

View File

@ -43,6 +43,10 @@ static const uart_conf_t uart_config[] = {
.dev = &SERCOM5->USART,
.rx_pin = GPIO_PIN(PB,3), /* D0, RX Pin */
.tx_pin = GPIO_PIN(PB,2), /* D1, TX Pin */
#ifdef MODULE_SAM0_PERIPH_UART_HW_FC
.rts_pin = GPIO_UNDEF,
.cts_pin = GPIO_UNDEF,
#endif
.mux = GPIO_MUX_D,
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0,
@ -53,6 +57,10 @@ static const uart_conf_t uart_config[] = {
.dev = &SERCOM2->USART,
.rx_pin = GPIO_PIN(PA,13),
.tx_pin = GPIO_PIN(PA,12),
#ifdef MODULE_SAM0_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,

View File

@ -46,6 +46,10 @@ static const uart_conf_t uart_config[] = {
.dev = &SERCOM5->USART,
.rx_pin = GPIO_PIN(PB, 30), /* D0, RX Pin */
.tx_pin = GPIO_PIN(PB, 31), /* D1, TX Pin */
#ifdef MODULE_SAM0_PERIPH_UART_HW_FC
.rts_pin = GPIO_UNDEF,
.cts_pin = GPIO_UNDEF,
#endif
.mux = GPIO_MUX_D,
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0,
@ -56,6 +60,10 @@ static const uart_conf_t uart_config[] = {
.dev = &SERCOM0->USART,
.rx_pin = GPIO_PIN(PA,5),
.tx_pin = GPIO_PIN(PA,6),
#ifdef MODULE_SAM0_PERIPH_UART_HW_FC
.rts_pin = GPIO_UNDEF,
.cts_pin = GPIO_UNDEF,
#endif
.mux = GPIO_MUX_D,
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_2,