diff options
author | Min Xu <min.xu@min-info.net> | 2014-10-25 21:18:03 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2014-11-11 22:30:54 +0100 |
commit | 7e3c9959e1e140753738be9b6d4142f6c2068e3d (patch) | |
tree | d4e41e2186730cf09121991f42cc2c4ea77916fa /firmware/src/simtrace/iso7816_uart.c | |
parent | 9662f2830a076a089373f3a4e6ecd93515cd108f (diff) |
iso_uart: Print more errors, not just overruns
Diffstat (limited to 'firmware/src/simtrace/iso7816_uart.c')
-rw-r--r-- | firmware/src/simtrace/iso7816_uart.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/firmware/src/simtrace/iso7816_uart.c b/firmware/src/simtrace/iso7816_uart.c index 780340f..e37deba 100644 --- a/firmware/src/simtrace/iso7816_uart.c +++ b/firmware/src/simtrace/iso7816_uart.c @@ -125,12 +125,18 @@ static const u_int8_t di_table[] = { 12, 20, 2, 4, 8, 16, 32, 64, }; -void iso_uart_report_overrun(void) +void iso_uart_report_errors(void) { - static unsigned lastOverrun = 0; + static unsigned lastOverrun = 0, lastParity = 0, lastFrame = 0; if (isoh.stats.overrun != lastOverrun) { DEBUGPCR("UART overrun: %u", lastOverrun = isoh.stats.overrun); } + if (isoh.stats.frame_err != lastFrame) { + DEBUGPCR("UART frame error: %u", lastFrame = isoh.stats.frame_err); + } + if (isoh.stats.parity_err != lastParity) { + DEBUGPCR("UART parity error: %u", lastParity = isoh.stats.parity_err); + } } void iso_uart_stats_dump(void) |