mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-16 21:28:33 +03:00
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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user