summaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-05-04 10:21:12 +0000
committerJosh Blum <josh@joshknows.com>2010-05-04 10:21:12 +0000
commitfae1f9ab670502cc2ee5ec20cd0a1d00456339ac (patch)
tree06db9cee9b7e42934fa665d6b4950a2a14ad193e /host
parent28e7c95a7c96ca3a07c6e5450bfc9c6c3d1bf2a4 (diff)
parent16c5767940f8feb99c108c170ae4fb4f17b27141 (diff)
downloaduhd-fae1f9ab670502cc2ee5ec20cd0a1d00456339ac.tar.gz
uhd-fae1f9ab670502cc2ee5ec20cd0a1d00456339ac.tar.bz2
uhd-fae1f9ab670502cc2ee5ec20cd0a1d00456339ac.zip
Merge branch 'usrp_e' of git@ettus.sourcerepo.com:ettus/uhdpriv into usrp_e
Diffstat (limited to 'host')
-rwxr-xr-xhost/apps/omap_debug/fetch-module.sh2
-rw-r--r--host/apps/omap_debug/usrp-e-i2c.c1
-rw-r--r--host/apps/omap_debug/usrp-e-spi.c3
-rw-r--r--host/apps/omap_debug/usrp_e.h4
4 files changed, 6 insertions, 4 deletions
diff --git a/host/apps/omap_debug/fetch-module.sh b/host/apps/omap_debug/fetch-module.sh
index e23289050..ec28989bd 100755
--- a/host/apps/omap_debug/fetch-module.sh
+++ b/host/apps/omap_debug/fetch-module.sh
@@ -1,6 +1,6 @@
if [ $GHQ ]; then
scp $GHQ_USER@astro:/workspace/usrp1-e-dev/kernel_usrp/drivers/misc/usrp_e.ko /lib/modules/2.6.33/kernel/drivers/misc
else
- scp balister@192.168.1.10:src/git/kernel_usrp/drivers/misc/usrp_e.ko /lib/modules/2.6.33-rc3/kernel/drivers/misc
+ scp balister@192.168.1.10:src/git/kernel_usrp/drivers/misc/usrp_e.ko /lib/modules/2.6.33/kernel/drivers/misc
fi
sync
diff --git a/host/apps/omap_debug/usrp-e-i2c.c b/host/apps/omap_debug/usrp-e-i2c.c
index 575430f84..615dc557b 100644
--- a/host/apps/omap_debug/usrp-e-i2c.c
+++ b/host/apps/omap_debug/usrp-e-i2c.c
@@ -1,6 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <unistd.h>
#include <sys/types.h>
#include <fcntl.h>
#include <sys/ioctl.h>
diff --git a/host/apps/omap_debug/usrp-e-spi.c b/host/apps/omap_debug/usrp-e-spi.c
index caa36b3f1..d2c38e524 100644
--- a/host/apps/omap_debug/usrp-e-spi.c
+++ b/host/apps/omap_debug/usrp-e-spi.c
@@ -1,5 +1,6 @@
#include <stdio.h>
#include <stdlib.h>
+#include <unistd.h>
#include <sys/types.h>
#include <fcntl.h>
#include <sys/ioctl.h>
@@ -36,7 +37,7 @@ int main(int argc, char *argv[])
if (*argv[1] == 'r') {
spi_dat.readback = 1;
ret = ioctl(fp, USRP_E_SPI, &spi_dat);
- printf("Data returned = %d\n", ret);
+ printf("Ioctl returns: %d, Data returned = %d\n", ret, spi_dat.data);
} else {
spi_dat.readback = 0;
ioctl(fp, USRP_E_SPI, &spi_dat);
diff --git a/host/apps/omap_debug/usrp_e.h b/host/apps/omap_debug/usrp_e.h
index d4132021f..0b582f59b 100644
--- a/host/apps/omap_debug/usrp_e.h
+++ b/host/apps/omap_debug/usrp_e.h
@@ -66,8 +66,8 @@ struct usrp_e_i2c {
#define USRP_E_READ_CTL16 _IOWR(USRP_E_IOC_MAGIC, 0x21, struct usrp_e_ctl16)
#define USRP_E_WRITE_CTL32 _IOW(USRP_E_IOC_MAGIC, 0x22, struct usrp_e_ctl32)
#define USRP_E_READ_CTL32 _IOWR(USRP_E_IOC_MAGIC, 0x23, struct usrp_e_ctl32)
-#define USRP_E_SPI _IOW(USRP_E_IOC_MAGIC, 0x24, struct usrp_e_spi)
-#define USRP_E_I2C_READ _IOR(USRP_E_IOC_MAGIC, 0x25, struct usrp_e_i2c)
+#define USRP_E_SPI _IOWR(USRP_E_IOC_MAGIC, 0x24, struct usrp_e_spi)
+#define USRP_E_I2C_READ _IOWR(USRP_E_IOC_MAGIC, 0x25, struct usrp_e_i2c)
#define USRP_E_I2C_WRITE _IOW(USRP_E_IOC_MAGIC, 0x26, struct usrp_e_i2c)
// Data transfer frame definition