Skip to content

Commit

Permalink
Remove redundant check in HardwareSerial
Browse files Browse the repository at this point in the history
Handled in the driver.
  • Loading branch information
mikee47 committed Sep 28, 2022
1 parent 927f203 commit 61b2cc7
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Sming/Core/HardwareSerial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ void HardwareSerial::begin(uint32_t baud, SerialFormat format, SerialMode mode,
{
end();

if(uartNr < 0)
if(uartNr < 0) {
return;
}

smg_uart_config_t cfg = {
.uart_nr = (uint8_t)uartNr,
Expand All @@ -56,10 +57,6 @@ void HardwareSerial::end()
return;
}

if(smg_uart_get_debug() == uartNr) {
smg_uart_set_debug(UART_NO);
}

smg_uart_uninit(uart);
uart = nullptr;
}
Expand Down

0 comments on commit 61b2cc7

Please sign in to comment.