summaryrefslogtreecommitdiffstats
path: root/tools/bccmd.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2006-01-30 23:22:51 +0000
committerMarcel Holtmann <marcel@holtmann.org>2006-01-30 23:22:51 +0000
commit97e0baa36f2177c90f58c3d3670feed5149f354a (patch)
treed969cc1c498842deda78cbad005c4e514eb59c62 /tools/bccmd.c
parent05e39374143b7b052e49ef65382ed30fe276a442 (diff)
Add support for TXData1 radio test command
Diffstat (limited to 'tools/bccmd.c')
-rw-r--r--tools/bccmd.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/tools/bccmd.c b/tools/bccmd.c
index 62ffd0ce..b48eb525 100644
--- a/tools/bccmd.c
+++ b/tools/bccmd.c
@@ -429,6 +429,31 @@ static int cmd_enabletx(int transport, int argc, char *argv[])
return transport_write(transport, CSR_VARID_ENABLE_TX, NULL, 0);
}
+static int cmd_rttxdata1(int transport, int argc, char *argv[])
+{
+ uint8_t array[8];
+ uint16_t freq, level;
+
+ OPT_HELP(2, NULL);
+
+ freq = atoi(argv[0]);
+
+ if (!strncasecmp(argv[1], "0x", 2))
+ level = strtol(argv[1], NULL, 16);
+ else
+ level = atoi(argv[1]);
+
+ memset(array, 0, sizeof(array));
+ array[0] = 0x04;
+ array[1] = 0x00;
+ array[2] = freq & 0xff;
+ array[3] = freq >> 8;
+ array[4] = level & 0xff;
+ array[5] = level >> 8;
+
+ return transport_write(transport, CSR_VARID_RADIOTEST, array, 8);
+}
+
static int cmd_memtypes(int transport, int argc, char *argv[])
{
uint8_t array[8];
@@ -932,6 +957,7 @@ static struct {
{ "warmreset", cmd_warmreset, "", "Perform warm reset" },
{ "disabletx", cmd_disabletx, "", "Disable TX on the device" },
{ "enabletx", cmd_enabletx, "", "Enable TX on the device" },
+ { "rttxdata1", cmd_rttxdata1, "<freq> <level>","TXData1 radio test" },
{ "memtypes", cmd_memtypes, NULL, "Get memory types" },
{ "psget", cmd_psget, "<key>", "Get value for PS key" },
{ "psset", cmd_psset, "<key> <value>", "Set value for PS key" },