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

Merge pull request #15205 from benpicco/cpu/sam0_common-drop_inv_tx

cpu/sam0_common: UART: Revert "implement inverted RX & TX"
This commit is contained in:
Dylan Laduranty 2021-05-23 21:40:16 +02:00 committed by GitHub
commit 596cee61e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 14 deletions

View File

@ -178,8 +178,6 @@ typedef enum {
UART_FLAG_NONE = 0x0, /**< No flags set */
UART_FLAG_RUN_STANDBY = 0x1, /**< run SERCOM in standby mode */
UART_FLAG_WAKEUP = 0x2, /**< wake from sleep on receive */
UART_FLAG_RXINV = 0x4, /**< invert RX signal */
UART_FLAG_TXINV = 0x8, /**< invert TX signal */
} uart_flag_t;
#ifndef DOXYGEN

View File

@ -190,18 +190,6 @@ int uart_init(uart_t uart, uint32_t baudrate, uart_rx_cb_t rx_cb, void *arg)
if (uart_config[uart].flags & UART_FLAG_RUN_STANDBY) {
dev(uart)->CTRLA.reg |= SERCOM_USART_CTRLA_RUNSTDBY;
}
#ifdef SERCOM_USART_CTRLA_RXINV
/* COM100-61: The TXINV and RXINV bits in the CTRLA register have inverted functionality. */
if (uart_config[uart].flags & UART_FLAG_TXINV) {
dev(uart)->CTRLA.reg |= SERCOM_USART_CTRLA_RXINV;
}
#endif
#ifdef SERCOM_USART_CTRLA_TXINV
/* COM100-61: The TXINV and RXINV bits in the CTRLA register have inverted functionality. */
if (uart_config[uart].flags & UART_FLAG_RXINV) {
dev(uart)->CTRLA.reg |= SERCOM_USART_CTRLA_TXINV;
}
#endif
/* calculate and set baudrate */
_set_baud(uart, baudrate);