cardem: Make card_emu_report_status() optionally use IRQ endpoint

This just introduces the capability to report on IRQ, but we don't
actually use it yet.

Change-Id: I83db4463b7010ba243a8adbda3ac9393975b4814
This commit is contained in:
Harald Welte
2019-12-16 10:23:32 +01:00
parent 12c9b7ba02
commit 140f007c3e
4 changed files with 9 additions and 6 deletions

View File

@@ -1051,13 +1051,16 @@ void card_emu_have_new_uart_tx(struct card_handle *ch)
}
}
void card_emu_report_status(struct card_handle *ch)
void card_emu_report_status(struct card_handle *ch, bool report_on_irq)
{
struct msgb *msg;
struct cardemu_usb_msg_status *sts;
uint8_t ep = ch->in_ep;
msg = usb_buf_alloc_st(ch->in_ep, SIMTRACE_MSGC_CARDEM,
SIMTRACE_MSGT_BD_CEMU_STATUS);
if (report_on_irq)
ep = ch->irq_ep;
msg = usb_buf_alloc_st(ep, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_BD_CEMU_STATUS);
if (!msg)
return;