diff options
-rwxr-xr-x | host/apps/omap_debug/fetch-module.sh | 2 | ||||
-rw-r--r-- | host/apps/omap_debug/usrp-e-i2c.c | 1 | ||||
-rw-r--r-- | host/apps/omap_debug/usrp-e-spi.c | 3 | ||||
-rw-r--r-- | host/apps/omap_debug/usrp_e.h | 4 |
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 |