Skip to content

Commit

Permalink
[fnUART] remove workaround for uart bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
tschak909 committed Jul 28, 2023
1 parent 655845b commit 7b80cb0
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions lib/hardware/fnUART.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,19 @@ void UARTManager::begin(int baud)
// This works around an obscure hardware bug where resetting UART2 causes the TX to become corrupted
// when the FIFO is reset by this function. Blame me for it -Thom
// ... except on the Adam, which needs this to happen regardless. Go figure.
#ifdef BUILD_ATARI
if (_uart_num == UART_SIO)
{
if (esp_reset_reason() != ESP_RST_SW)
uart_param_config(_uart_num, &uart_config);
}
else if (_uart_num == UART_DEBUG)
{
uart_param_config(_uart_num, &uart_config);
}
#else
uart_param_config(_uart_num, &uart_config);
#endif
// #ifdef BUILD_ATARI
// if (_uart_num == UART_SIO)
// {
// if (esp_reset_reason() != ESP_RST_SW)
// uart_param_config(_uart_num, &uart_config);
// }
// else if (_uart_num == UART_DEBUG)
// {
// uart_param_config(_uart_num, &uart_config);
// }
// #else
uart_param_config(_uart_num, &uart_config); // now always gets called.
// #endif

int tx, rx;
if (_uart_num == 0)
Expand Down

0 comments on commit 7b80cb0

Please sign in to comment.