summaryrefslogtreecommitdiffstats
path: root/host/apps/omap_debug
diff options
context:
space:
mode:
authorPhilip Balister <philip@opensdr.com>2010-04-01 19:27:59 +0000
committerPhilip Balister <philip@opensdr.com>2010-04-01 19:27:59 +0000
commit9b30d7293f93ec340c23448147c425c398c01db4 (patch)
tree1abf802d36cba6d9a5f24360fed273352600276e /host/apps/omap_debug
parent3e01c94fe0c690293f13a09666deb79fcb6af58c (diff)
downloaduhd-9b30d7293f93ec340c23448147c425c398c01db4.tar.gz
uhd-9b30d7293f93ec340c23448147c425c398c01db4.tar.bz2
uhd-9b30d7293f93ec340c23448147c425c398c01db4.zip
Allow variable length spi messages.
Diffstat (limited to 'host/apps/omap_debug')
-rw-r--r--host/apps/omap_debug/usrp-e-spi.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/host/apps/omap_debug/usrp-e-spi.c b/host/apps/omap_debug/usrp-e-spi.c
index f7131bbe3..de1409647 100644
--- a/host/apps/omap_debug/usrp-e-spi.c
+++ b/host/apps/omap_debug/usrp-e-spi.c
@@ -10,23 +10,24 @@
int main(int argc, char *argv[])
{
- int fp, slave, data, ret;
+ int fp, slave, length, data, ret;
struct usrp_e_spi spi_dat;
- if (argc < 4) {
- printf("Usage: usrp_e_spi w|rb slave data\n");
+ if (argc < 5) {
+ printf("Usage: usrp_e_spi w|rb slave transfer_length data\n");
exit(-1);
}
slave = atoi(argv[2]);
- data = atoi(argv[3]);
+ length = atoi(argv[3]);
+ data = atoi(argv[4]);
fp = open("/dev/usrp_e0", O_RDWR);
printf("fp = %d\n", fp);
spi_dat.slave = slave;
spi_dat.data = data;
- spi_dat.length = 32;
+ spi_dat.length = length;
spi_dat.flags = 0;
if (*argv[1] == 'r') {