summaryrefslogtreecommitdiff
path: root/firmware/src/simtrace/iso7816_uart.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/src/simtrace/iso7816_uart.c')
-rw-r--r--firmware/src/simtrace/iso7816_uart.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/firmware/src/simtrace/iso7816_uart.c b/firmware/src/simtrace/iso7816_uart.c
index 52522c0..611ccfb 100644
--- a/firmware/src/simtrace/iso7816_uart.c
+++ b/firmware/src/simtrace/iso7816_uart.c
@@ -125,6 +125,14 @@ static const u_int8_t di_table[] = {
12, 20, 2, 4, 8, 16, 32, 64,
};
+void iso_uart_report_overrun(void)
+{
+ static unsigned lastOverrun = 0;
+ if (isoh.stats.overrun != lastOverrun) {
+ DEBUGPCR("UART overrun: %u", lastOverrun = isoh.stats.overrun);
+ }
+}
+
void iso_uart_stats_dump(void)
{
DEBUGPCRF("no_rctx: %u, rctx_sent: %u, rst: %u, pps: %u, bytes: %u, "
@@ -675,6 +683,8 @@ void iso_uart_init(void)
{
DEBUGPCR("USART Initializing");
+ memset(&isoh, 0, sizeof(isoh));
+
refill_rctx(&isoh);
/* make sure we get clock from the power management controller */
personal git repositories of Harald Welte. Your mileage may vary