Shinichiro Nakamura / HighSpeedAnalogIn_TestProgram

Description: A test program for my high speed analog input class.

Files at this revision

API Documentation at this revision

Comitter:
user Shinichiro Nakamura
Date:
Fri Feb 04 22:17:40 2011 +0000
Commit message:
Initial version.

Changed in this revision

HighSpeedAnalogIn.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/HighSpeedAnalogIn.lib	Fri Feb 04 22:17:40 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/shintamainjp/code/HighSpeedAnalogIn/#db55359719e7
--- /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;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Feb 04 22:17:40 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/e2ac27c8e93e