summaryrefslogtreecommitdiffstats
path: root/host/apps/omap_debug/usrp-e-write.c
blob: 903c0071f6cd9a957d86580d1a6b269f95ad3e48 (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, i, cnt;
	short buf[1024];

	fp = open("/dev/usrp1_e0", O_WRONLY);
	printf("fp = %d\n", fp);

	for (i=0; i<1024; i++) {
		buf[i] = i;
	}

//	do {
		cnt = write(fp, buf, 2048);
		printf("Bytes written - %d\n", cnt);
//	} while (1);
}