Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: libraries/tests/benchmarks/all/main.cpp
- Revision:
- 0:6c56fb4bc5f0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/libraries/tests/benchmarks/all/main.cpp Fri Nov 04 20:27:58 2016 +0000
@@ -0,0 +1,19 @@
+#include "mbed.h"
+
+DigitalOut out(p5);
+#if defined(TARGET_LPC1114)
+AnalogIn in(p20);
+#else
+AnalogIn in(p19);
+#endif
+
+volatile float w, x, y, z;
+int main() {
+ while(1) {
+ z = x * y / w;
+ printf("Hello World %d %f\n", out.read(), z);
+ if(in > 0.5) {
+ out = !out;
+ }
+ }
+}