]> rtime.felk.cvut.cz Git - mf6xx.git/commitdiff
Compilable version; Example 'test' seems to work properly. hudaqlib
authorRostislav Lisovy <lisovy@gmail.com>
Fri, 25 Feb 2011 22:57:00 +0000 (23:57 +0100)
committerRostislav Lisovy <lisovy@gmail.com>
Fri, 25 Feb 2011 22:57:00 +0000 (23:57 +0100)
src/HuLinux-2.4.3/MF624.c
src/HuLinux-2.4.3/makefile
src/HuLinux-2.4.3/samples/Makefile [new file with mode: 0644]
src/HuLinux-2.4.3/samples/readme.txt [new file with mode: 0644]
src/HuLinux-2.4.3/samples/test.c

index 98fdb0ea9d3c1d98f83268b83ab9befacb675f89..bd9bbf05e423e0a3be2475e42445ef931bd9d806 100644 (file)
@@ -8,7 +8,7 @@
 #if defined(_WIN32) || defined(_WIN64)\r
 #include <windows.h>\r
 #else\r
-#include <asm/io.h>\r
+#include <sys/io.h>\r
 #endif\r
 #include <malloc.h>\r
 #include <math.h>\r
index 56897864484f7cf37042c65138d52586f39c4592..ffa3df84550dd6b0c0ee77b939a6b7f1f3328459 100644 (file)
@@ -82,7 +82,7 @@ $(TARGET_LIB): $(OBJECTS) $(MAKEFILE_LIST)
        ar rcs $(TARGET_LIB) $(OBJECTS)
 
 $(TARGET_DLL): $(LOBJECTS) $(MAKEFILE_LIST)
-       gcc -shared $(LOBJECTS) -fvisibilty=hidden -lrt -Wl,-soname,libhudaqlib.so -o $(TARGET_DLL)
+       gcc -shared $(LOBJECTS) -fvisibilty=hidden -lrt -lm -Wl,-soname,libhudaqlib.so -o $(TARGET_DLL)
        ln -s -f $(TARGET_DLL) libhudaqlib.so
 
 $(OBJDIR) :
diff --git a/src/HuLinux-2.4.3/samples/Makefile b/src/HuLinux-2.4.3/samples/Makefile
new file mode 100644 (file)
index 0000000..4cba1e7
--- /dev/null
@@ -0,0 +1,3 @@
+all:
+       gcc test.c -I .. -lhudaqlib -o test
+
diff --git a/src/HuLinux-2.4.3/samples/readme.txt b/src/HuLinux-2.4.3/samples/readme.txt
new file mode 100644 (file)
index 0000000..544e236
--- /dev/null
@@ -0,0 +1 @@
+Run examples as root
index 19d6e2ce6b828aa1636c40d2fc980396b8a42422..da3b1716ccb3e8f779814b41222e4e47fa3cd81d 100644 (file)
@@ -12,8 +12,8 @@ int main(void)
 
        //  h = HudaqOpenDevice("PCI1753",1,0);
        //  h = HudaqOpenDevice("PCD7004",1,0);
-       h = HudaqOpenDevice("PCT7303B",1,0);
-       // h = HudaqOpenDevice("MF614",1,0);
+       //  h = HudaqOpenDevice("PCT7303B",1,0);
+       h = HudaqOpenDevice("MF614",1,0);
        if(h==0)
        {
                h = HudaqOpenDevice("MF624",1,0);