aboutsummaryrefslogtreecommitdiffstats
path: root/host/apps/omap_debug/u1e-read-stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'host/apps/omap_debug/u1e-read-stream.c')
-rw-r--r--host/apps/omap_debug/u1e-read-stream.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/host/apps/omap_debug/u1e-read-stream.c b/host/apps/omap_debug/u1e-read-stream.c
new file mode 100644
index 000000000..4e4c21d9e
--- /dev/null
+++ b/host/apps/omap_debug/u1e-read-stream.c
@@ -0,0 +1,21 @@
+#include <stdio.h>
+#include <sys/types.h>
+#include <fcntl.h>
+
+int main(int rgc, char *argv[])
+{
+ int fp, cnt, n;
+ short buf[1024];
+
+ n = 0;
+
+ fp = open("/dev/usrp1_e0", O_RDONLY);
+ printf("fp = %d\n", fp);
+
+ do {
+ cnt = read(fp, buf, 2048);
+ n++;
+// printf("Bytes read - %d\n", cnt);
+ } while(n < 10*512);
+ printf("Data - %hX\n", buf[0]);
+}