From 82cd9d0b1c3140af30518fcc28af539fac5906ae Mon Sep 17 00:00:00 2001 From: guest Date: Tue, 23 Oct 2007 15:02:21 +0000 Subject: git-svn-id: svn+ssh://mecka.net/home/svn/dds@16 c30cbac5-9f56-4f76-8ed5-5c34e48a65ae --- iotest/src/iotest.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'iotest/src/iotest.cpp') 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 - +#include #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; -- cgit v1.2.3