summaryrefslogtreecommitdiff
path: root/tmk_core/tool/mbed/mbed-sdk/libraries/tests/benchmarks/mbed/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core/tool/mbed/mbed-sdk/libraries/tests/benchmarks/mbed/main.cpp')
-rw-r--r--tmk_core/tool/mbed/mbed-sdk/libraries/tests/benchmarks/mbed/main.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/tmk_core/tool/mbed/mbed-sdk/libraries/tests/benchmarks/mbed/main.cpp b/tmk_core/tool/mbed/mbed-sdk/libraries/tests/benchmarks/mbed/main.cpp
new file mode 100644
index 0000000000..aa99784a3b
--- /dev/null
+++ b/tmk_core/tool/mbed/mbed-sdk/libraries/tests/benchmarks/mbed/main.cpp
@@ -0,0 +1,16 @@
+#include "mbed.h"
+
+DigitalOut out(p5);
+#if defined(TARGET_LPC1114)
+AnalogIn in(p20);
+#else
+AnalogIn in(p19);
+#endif
+
+int main() {
+ while(1) {
+ if(in > 0.5) {
+ out = !out;
+ }
+ }
+}