Skip to content

Commit

Permalink
cpu/sam0_common: uart: drop TX pin check on every write()
Browse files Browse the repository at this point in the history
We don't need to check if the configuration is valid for every
call to `uart_write()`.
Other implementations don't check this either.
  • Loading branch information
benpicco committed Nov 23, 2020
1 parent 0d3b119 commit a153a16
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions cpu/sam0_common/periph/uart.c
Expand Up @@ -290,10 +290,6 @@ void uart_write_byte(uart_t uart, uint8_t data)

void uart_write(uart_t uart, const uint8_t *data, size_t len)
{
if (!gpio_is_valid(uart_config[uart].tx_pin)) {
return;
}

for (const void* end = data + len; data != end; ++data) {
_write_byte(uart, *data);
}
Expand Down

0 comments on commit a153a16

Please sign in to comment.