From 7a4a3117d06e2f6cff4245d1d96d415a9c176f71 Mon Sep 17 00:00:00 2001 From: Eric Wild Date: Wed, 20 Nov 2019 19:43:54 +0100 Subject: [PATCH] fix irq endpoint handling the irq endpoint only offers data if card insertions/removals happen, which is rarely the case, so read timeouts are fine. Change-Id: Ide7ffe14c94f56d0ed6f27e30e039905be32ad09 --- src/CCID_Emulation.ttcn | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/CCID_Emulation.ttcn b/src/CCID_Emulation.ttcn index 2f376af..1028c7e 100644 --- a/src/CCID_Emulation.ttcn +++ b/src/CCID_Emulation.ttcn @@ -119,6 +119,11 @@ function main() runs on CCID_Emulation_CT { } */ } + [] USB.receive(tr_UsbXfer_compl(g_ep_irq, USB_TRANSFER_TYPE_INTERRUPT, + USB_TRANSFER_TIMED_OUT, g_dev_hdl, ?)) -> value tc { + /* Submit another IRQ transfer */ + f_usb_submit_xfer(g_ep_irq); + } [] USB.receive(tr_UsbXfer_compl(?, ?, USB_TRANSFER_ERROR, g_dev_hdl, ?)) -> value tc { setverdict(fail, "Unexpected USB_TRANSFER_ERROR on EP ", int2hex(tc.endpoint, 2)); mtc.stop;