From 060eac06b883637acd9e0c02be6ae5f2368a5060 Mon Sep 17 00:00:00 2001 From: internal <> Date: Mon, 31 Jul 2023 22:02:11 +0200 Subject: [PATCH] add ddb_mci_cmd_link_simple() --- ddbridge/ddbridge-mci.c | 11 +++++++++++ ddbridge/ddbridge-mci.h | 1 + 2 files changed, 12 insertions(+) diff --git a/ddbridge/ddbridge-mci.c b/ddbridge/ddbridge-mci.c index 0d093aa..7239369 100644 --- a/ddbridge/ddbridge-mci.c +++ b/ddbridge/ddbridge-mci.c @@ -152,6 +152,17 @@ int ddb_mci_cmd_link(struct ddb_link *link, return stat; } +int ddb_mci_cmd_link_simple(struct ddb_link *link, u8 command, u8 demod, u8 value) +{ + struct mci_command cmd; + + memset(&cmd, 0, sizeof(cmd)); + cmd.command = command; + cmd.demod = demod; + cmd.params8[0] = value; + return ddb_mci_cmd_link(link, &cmd, 0); +} + static void mci_handler(void *priv) { struct ddb_link *link = (struct ddb_link *) priv; diff --git a/ddbridge/ddbridge-mci.h b/ddbridge/ddbridge-mci.h index b3ea69f..bab57a8 100644 --- a/ddbridge/ddbridge-mci.h +++ b/ddbridge/ddbridge-mci.h @@ -993,6 +993,7 @@ struct mci_cfg { int ddb_mci_cmd(struct mci *state, struct mci_command *command, struct mci_result *result); int ddb_mci_cmd_link(struct ddb_link *link, struct mci_command *command, struct mci_result *result); +int ddb_mci_cmd_link_simple(struct ddb_link *link, u8 command, u8 demod, u8 value); int ddb_mci_get_status(struct mci *mci, struct mci_result *res); int ddb_mci_get_snr(struct dvb_frontend *fe); int ddb_mci_get_info(struct mci *mci);