summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2017-06-03 19:02:20 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2017-10-23 22:05:49 +0330
commitcb0625cea9bd2a3d775083f0a505347baf913771 (patch)
treeab7b1b70ae3095144eb42b66163b91b76df80408
parenta1e379842c09d3b9effe80ad84e4d1d5ddcae92b (diff)
host/trxcon/trx_if.c: add ECHO command
This command should be used to check transceiver availability. Change-Id: I6af2d5e413ff7ab751cb34e1659742b0f59b6cca
-rw-r--r--src/host/trxcon/trx_if.c9
-rw-r--r--src/host/trxcon/trx_if.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/src/host/trxcon/trx_if.c b/src/host/trxcon/trx_if.c
index 9ae4900..5b0b7b1 100644
--- a/src/host/trxcon/trx_if.c
+++ b/src/host/trxcon/trx_if.c
@@ -239,6 +239,10 @@ static int trx_ctrl_cmd(struct trx_instance *trx, int critical,
/*
* Power Control
*
+ * ECHO is used to check transceiver availability.
+ * CMD ECHO
+ * RSP ECHO <status>
+ *
* POWEROFF shuts off transmitter power and stops the demodulator.
* CMD POWEROFF
* RSP POWEROFF <status>
@@ -253,6 +257,11 @@ static int trx_ctrl_cmd(struct trx_instance *trx, int critical,
* RSP POWERON <status>
*/
+int trx_if_cmd_echo(struct trx_instance *trx)
+{
+ return trx_ctrl_cmd(trx, 1, "ECHO", "");
+}
+
int trx_if_cmd_poweroff(struct trx_instance *trx)
{
return trx_ctrl_cmd(trx, 1, "POWEROFF", "");
diff --git a/src/host/trxcon/trx_if.h b/src/host/trxcon/trx_if.h
index fadf604..6f54b3e 100644
--- a/src/host/trxcon/trx_if.h
+++ b/src/host/trxcon/trx_if.h
@@ -25,6 +25,7 @@ void trx_if_close(struct trx_instance *trx);
int trx_if_cmd_poweron(struct trx_instance *trx);
int trx_if_cmd_poweroff(struct trx_instance *trx);
+int trx_if_cmd_echo(struct trx_instance *trx);
int trx_if_cmd_setpower(struct trx_instance *trx, int db);
int trx_if_cmd_adjpower(struct trx_instance *trx, int db);