This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/simtrace2/+/16616 ) Change subject: cardem: Make card_emu_report_status() optionally use IRQ endpoint ...................................................................... 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 --- M firmware/libcommon/include/card_emu.h M firmware/libcommon/include/simtrace_usb.h M firmware/libcommon/source/card_emu.c M firmware/libcommon/source/mode_cardemu.c 4 files changed, 9 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/16/16616/1 diff --git a/firmware/libcommon/include/card_emu.h b/firmware/libcommon/include/card_emu.h index e545593..aaa07c5 100644 --- a/firmware/libcommon/include/card_emu.h +++ b/firmware/libcommon/include/card_emu.h @@ -56,7 +56,7 @@ struct llist_head *card_emu_get_uart_tx_queue(struct card_handle *ch); 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); #define ENABLE_TX 0x01 #define ENABLE_RX 0x02 diff --git a/firmware/libcommon/include/simtrace_usb.h b/firmware/libcommon/include/simtrace_usb.h index c0da9c5..be2da9f 100644 --- a/firmware/libcommon/include/simtrace_usb.h +++ b/firmware/libcommon/include/simtrace_usb.h @@ -64,4 +64,4 @@ #define SIMTRACE_CARDEM_USB_EP_USIM2_INT 3 /*! Maximum number of endpoints */ -#define BOARD_USB_NUMENDPOINTS 6 +#define BOARD_USB_NUMENDPOINTS 7 /* 0 (control) + 2 (interfaces) * 3 (endpoints) */ diff --git a/firmware/libcommon/source/card_emu.c b/firmware/libcommon/source/card_emu.c index ced6b14..352284f 100644 --- a/firmware/libcommon/source/card_emu.c +++ b/firmware/libcommon/source/card_emu.c @@ -1051,13 +1051,16 @@ } } -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; diff --git a/firmware/libcommon/source/mode_cardemu.c b/firmware/libcommon/source/mode_cardemu.c index 1d074cb..fbc042f 100644 --- a/firmware/libcommon/source/mode_cardemu.c +++ b/firmware/libcommon/source/mode_cardemu.c @@ -538,7 +538,7 @@ usb_buf_free(msg); break; case SIMTRACE_MSGT_BD_CEMU_STATUS: - card_emu_report_status(ci->ch); + card_emu_report_status(ci->ch, false); usb_buf_free(msg); break; case SIMTRACE_MSGT_BD_CEMU_STATS: -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16616 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I83db4463b7010ba243a8adbda3ac9393975b4814 Gerrit-Change-Number: 16616 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge at osmocom.org> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191216/7eb3c86d/attachment.htm>