]> git.gir.st - tmk_keyboard.git/blob - tmk_core/tool/mbed/mbed-sdk/libraries/tests/benchmarks/all/main.cpp
Merge pull request #271 from jeffgran/default-layer-toggle
[tmk_keyboard.git] / tmk_core / tool / mbed / mbed-sdk / libraries / tests / benchmarks / all / main.cpp
1 #include "mbed.h"
2
3 DigitalOut out(p5);
4 #if defined(TARGET_LPC1114)
5 AnalogIn in(p20);
6 #else
7 AnalogIn in(p19);
8 #endif
9
10 volatile float w, x, y, z;
11 int main() {
12 while(1) {
13 z = x * y / w;
14 printf("Hello World %d %f\n", out.read(), z);
15 if(in > 0.5) {
16 out = !out;
17 }
18 }
19 }
Imprint / Impressum