aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/test
diff options
context:
space:
mode:
authorKévin Redon <kredon@sysmocom.de>2018-07-29 00:18:12 +0200
committerKévin Redon <kredon@sysmocom.de>2018-07-30 15:02:35 +0200
commitebe672e92666f3e05cb7dacb04868fe168a19889 (patch)
tree3563f6f4f3d23f6008b670c2991127ba864409c5 /firmware/test
parentd8ebd6ab77fc422232e679a36887f40a56c24e53 (diff)
cardem: use TC_ETU to trigger ATR sending
this changes how ATR is handled. the ATR is also printed when set (as important debug information). the test is also updated to correspond to the new mechanism ( simulating the timeout before sending the ATR) Change-Id: I69df797e2feadffa9f5f977cb71b69386cee7cd0
Diffstat (limited to 'firmware/test')
-rw-r--r--firmware/test/card_emu_tests.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/firmware/test/card_emu_tests.c b/firmware/test/card_emu_tests.c
index 3ea0678..09b2e0d 100644
--- a/firmware/test/card_emu_tests.c
+++ b/firmware/test/card_emu_tests.c
@@ -65,6 +65,11 @@ void card_emu_uart_enable(uint8_t uart_chan, uint8_t rxtx)
printf("uart_enable(uart_chan=%u, %s)\n", uart_chan, rts);
}
+void card_emu_uart_interrupt(uint8_t uart_chan)
+{
+ printf("uart_interrupt(uart_chan=%u)\n", uart_chan);
+}
+
void tc_etu_set_wtime(uint8_t tc_chan, uint16_t wtime)
{
printf("tc_etu_set_wtime(tc_chan=%u, wtime=%u)\n", tc_chan, wtime);
@@ -120,6 +125,8 @@ static void io_start_card(struct card_handle *ch)
/* release from reset and verify th ATR */
card_emu_io_statechg(ch, CARD_IO_RST, 0);
+ /* simulate waiting time before ATR expired */
+ tc_etu_wtime_expired(ch);
verify_atr(ch);
}