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

cpu/sam0/uart: implement uart_pin_cts()/uart_pin_rts()

This commit is contained in:
Benjamin Valentin 2023-12-12 20:26:17 +01:00
parent 5acfb20d02
commit 6b86e274d9

View File

@ -318,6 +318,28 @@ void uart_deinit_pins(uart_t uart)
#endif
}
gpio_t uart_pin_cts(uart_t uart)
{
#ifdef MODULE_PERIPH_UART_HW_FC
if (uart_config[uart].tx_pad == UART_PAD_TX_0_RTS_2_CTS_3) {
return uart_config[uart].cts_pin;
}
#endif
(void)uart;
return GPIO_UNDEF;
}
gpio_t uart_pin_rts(uart_t uart)
{
#ifdef MODULE_PERIPH_UART_HW_FC
if (uart_config[uart].tx_pad == UART_PAD_TX_0_RTS_2_CTS_3) {
return uart_config[uart].rts_pin;
}
#endif
(void)uart;
return GPIO_UNDEF;
}
void uart_write(uart_t uart, const uint8_t *data, size_t len)
{
if (uart_config[uart].tx_pin == GPIO_UNDEF) {