summaryrefslogtreecommitdiff
path: root/iotest/src/iotest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'iotest/src/iotest.cpp')
-rw-r--r--iotest/src/iotest.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/iotest/src/iotest.cpp b/iotest/src/iotest.cpp
index a3b3337..491fd01 100644
--- a/iotest/src/iotest.cpp
+++ b/iotest/src/iotest.cpp
@@ -7,21 +7,28 @@
//============================================================================
#include <iostream>
-
+#include <time.h>
#include "diasio.h"
using namespace std;
int main() {
- cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!
DIASIO dias;
- int counter = 0;
+ int state = 0;
+ struct timespec halfmsec;
+ halfmsec.tv_sec = 0;
+ halfmsec.tv_nsec = 500000;
- while(counter < 255){
- dias.set(counter);
- counter++;
+ while(1){
+ dias.set(state);
+ if(state == 0x00)
+ state = 0xff;
+ else
+ state = 0x00;
+
+ nanosleep(&halfmsec, NULL);
}
return 0;