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
This commit is contained in:
Harald Welte
2020-02-22 21:53:50 +01:00
parent baa62777c8
commit 02712376df
2 changed files with 16 additions and 0 deletions

View File

@@ -204,6 +204,21 @@ int osmo_st2_cardem_request_set_atr(struct osmo_st2_cardem_inst *ci, const uint8
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
***********************************************************************/