Change in simtrace2[master]: simtrace2_api: Add osmo_st2_cardem_request_config()

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.org
Sat Feb 22 21:16:49 UTC 2020


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/simtrace2/+/17244 )


Change subject: simtrace2_api: Add osmo_st2_cardem_request_config()
......................................................................

simtrace2_api: Add osmo_st2_cardem_request_config()

In Change-Id I7cdd3f9171dbed45de0089defe29d2b59044bd84 we introduced
firmware support for SIMTRACE_MSGT_BD_CEMU_CONFIG.  The respective
host part was so far only implemented in osmo-remsim-client-st2,
but not in libosmo-simtrace2.  Let's fix that.

Change-Id: Ia4822d360a271d2ce9725f761cb95de58663ac3b
---
M host/include/osmocom/simtrace2/simtrace2_api.h
M host/lib/simtrace2_api.c
2 files changed, 16 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/44/17244/1

diff --git a/host/include/osmocom/simtrace2/simtrace2_api.h b/host/include/osmocom/simtrace2/simtrace2_api.h
index d31fb85..012b96c 100644
--- a/host/include/osmocom/simtrace2/simtrace2_api.h
+++ b/host/include/osmocom/simtrace2/simtrace2_api.h
@@ -48,6 +48,7 @@
 int osmo_st2_cardem_request_sw_tx(struct osmo_st2_cardem_inst *ci, const uint8_t *sw);
 int osmo_st2_cardem_request_set_atr(struct osmo_st2_cardem_inst *ci, const uint8_t *atr,
 				    unsigned int atr_len);
+int osmo_st2_cardem_request_config(struct osmo_st2_cardem_inst *ci, uint32_t features);
 
 
 int osmo_st2_modem_reset_pulse(struct osmo_st2_slot *slot, uint16_t duration_ms);
diff --git a/host/lib/simtrace2_api.c b/host/lib/simtrace2_api.c
index b2b2829..b3e4e38 100644
--- a/host/lib/simtrace2_api.c
+++ b/host/lib/simtrace2_api.c
@@ -204,6 +204,21 @@
 	return osmo_st2_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_DT_CEMU_SET_ATR);
 }
 
+int osmo_st2_cardem_request_config(struct osmo_st2_cardem_inst *ci, uint32_t features)
+{
+	struct msgb *msg = st_msgb_alloc();
+	struct cardemu_usb_msg_config *cfg;
+
+	cfg = (struct cardemu_usb_msg_config *) msgb_put(msg, sizeof(*cfg));
+
+	printf("<= %s(%08x)\n", __func__, features);
+
+	memset(cfg, 0, sizeof(*cfg));
+	cfg->features = features;
+
+	return osmo_st2_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_CARDEM, SIMTRACE_MSGT_BD_CEMU_CONFIG);
+}
+
 /***********************************************************************
  * Modem Control protocol
  ***********************************************************************/

-- 
To view, visit https://gerrit.osmocom.org/c/simtrace2/+/17244
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-Change-Id: Ia4822d360a271d2ce9725f761cb95de58663ac3b
Gerrit-Change-Number: 17244
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/20200222/ebca0428/attachment.htm>


More information about the gerrit-log mailing list