summaryrefslogtreecommitdiff
path: root/iotest/src/iotest.cpp
blob: 491fd013e01d4e4baeaf2146ec32e572d1cf443f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//============================================================================
// Name        : iotest.cpp
// Author      : Manuel Traut
// Version     :
// Copyright   : GPLv2
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include <time.h>
#include "diasio.h"

using namespace std;

int main() {
	
	DIASIO dias;
	
	int state = 0;
	struct timespec halfmsec;
	halfmsec.tv_sec  = 0;
	halfmsec.tv_nsec = 500000;
	
	while(1){
		dias.set(state);
		if(state == 0x00)
			state = 0xff;
		else
			state = 0x00;
		
		nanosleep(&halfmsec, NULL);
	}
	
	return 0;
}