summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Balister <philip@opensdr.com>2010-03-25 20:43:59 +0000
committerPhilip Balister <philip@opensdr.com>2010-03-25 20:43:59 +0000
commit717a6acd2b0687348c492cbf2e0813ffd63d847a (patch)
treed122ff9ed985406c14c57f97ac47e7dac7359b56
parent28e5e0740a8fc3c7233a1bd5cc6bbc897c586da6 (diff)
downloaduhd-717a6acd2b0687348c492cbf2e0813ffd63d847a.tar.gz
uhd-717a6acd2b0687348c492cbf2e0813ffd63d847a.tar.bz2
uhd-717a6acd2b0687348c492cbf2e0813ffd63d847a.zip
Update read/write test program to new header name and add to Makefile.
-rw-r--r--host/apps/omap_debug/Makefile6
-rw-r--r--host/apps/omap_debug/usrp-e-rw.c4
2 files changed, 7 insertions, 3 deletions
diff --git a/host/apps/omap_debug/Makefile b/host/apps/omap_debug/Makefile
index 07545a639..34446ccc3 100644
--- a/host/apps/omap_debug/Makefile
+++ b/host/apps/omap_debug/Makefile
@@ -1,11 +1,15 @@
CFLAGS=-Wall
-all : usrp-e-spi usrp-e-i2c
+all : usrp-e-spi usrp-e-i2c usrp-e-rw
usrp-e-spi : usrp-e-spi.c
usrp-e-i2c : usrp-e-i2c.c
+usrp-e-rw : usrp-e-rw.c
+ gcc -o $@ $< -lpthread
clean :
rm -f usrp-e-spi
rm -f usrp-e-i2c
+ rm -f usrp-e-rw
+
diff --git a/host/apps/omap_debug/usrp-e-rw.c b/host/apps/omap_debug/usrp-e-rw.c
index cd7fbe4dd..5607166b0 100644
--- a/host/apps/omap_debug/usrp-e-rw.c
+++ b/host/apps/omap_debug/usrp-e-rw.c
@@ -3,6 +3,7 @@
#include <fcntl.h>
#include <pthread.h>
#include <stdlib.h>
+#include <unistd.h>
struct pkt {
int checksum;
@@ -74,11 +75,10 @@ static void *write_thread(void *threadid)
int main(int argc, char *argv[])
{
- int ret;
pthread_t tx, rx;
long int t;
- fp = open("/dev/usrp1_e0", O_RDWR);
+ fp = open("/dev/usrp_e0", O_RDWR);
printf("fp = %d\n", fp);
if (pthread_create(&rx, NULL, read_thread, (void *) t)) {