Stop PSoC 6 UART output after the first TX timeout

pull/975/head
Aidan Garske 2026-11-13 13:06:25 -08:00
parent aadffc2cfe
commit 3eaf2f03b7
2 changed files with 3 additions and 1 deletions

View File

@ -517,6 +517,8 @@ static void psoc6_uart_putc(char c)
if (Cy_SCB_UART_Put(PSOC6_UART_SCB, (uint32_t)(uint8_t)c) != 0UL)
return;
}
/* A FIFO that stopped draining costs the spin bound once, not per char */
psoc6_uart_ready = 0;
}
#ifdef __WOLFBOOT

View File

@ -656,7 +656,7 @@ START_TEST(test_uart_putc_bounds_a_stuck_fifo)
{
uart_init();
tx_put_busy = 1;
uart_write("x", 1);
uart_write("xy\n", 3);
ck_assert_int_eq(tx_put_calls, (int)PSOC6_UART_SPIN_MAX);
}
END_TEST