From ebe672e92666f3e05cb7dacb04868fe168a19889 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Redon?= Date: Sun, 29 Jul 2018 00:18:12 +0200 Subject: 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 --- firmware/test/card_emu_tests.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'firmware/test/card_emu_tests.c') 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); } -- cgit v1.2.3