A test program for my high speed analog input class.

Dependencies:   mbed HighSpeedAnalogIn

Revision:
0:29975cf64da2
diff -r 000000000000 -r 29975cf64da2 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Feb 04 22:17:40 2011 +0000
@@ -0,0 +1,26 @@
+#include "mbed.h"
+#include "HighSpeedAnalogIn.h"
+
+BusOut chksig(p21, p22, p23, p24, p25, p26);
+HighSpeedAnalogIn ain(p15, p16, p17, p18, p19, p20);
+Ticker ticker;
+volatile int cnt = 0;
+
+void func() {
+    printf("cnt=%d\n", cnt);
+    cnt = 0;
+}
+
+int main() {
+    ticker.attach(&func, 1);
+    while (1) {
+        cnt++;
+        int val1 = ain.read(p15);
+        int val2 = ain.read(p16);
+        int val3 = ain.read(p17);
+        int val4 = ain.read(p18);
+        int val5 = ain.read(p19);
+        int val6 = ain.read(p20);
+        chksig = chksig + 1;
+    }
+}