summaryrefslogtreecommitdiffstats
path: root/host/apps/omap_debug/u1e-read-stream.c
blob: 4e4c21d9e944466eb9355470e4fd0646900167dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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]);
}