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.
mbed-os/features/unsupported/tests/benchmarks/mbed/main.cpp@0:9fca2b23d0ba, 2019-02-23 (annotated)
- Committer:
- marcozecchini
- Date:
- Sat Feb 23 12:13:36 2019 +0000
- Revision:
- 0:9fca2b23d0ba
final commit
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| marcozecchini | 0:9fca2b23d0ba | 1 | #include "mbed.h" |
| marcozecchini | 0:9fca2b23d0ba | 2 | |
| marcozecchini | 0:9fca2b23d0ba | 3 | DigitalOut out(p5); |
| marcozecchini | 0:9fca2b23d0ba | 4 | #if defined(TARGET_LPC1114) |
| marcozecchini | 0:9fca2b23d0ba | 5 | AnalogIn in(p20); |
| marcozecchini | 0:9fca2b23d0ba | 6 | #else |
| marcozecchini | 0:9fca2b23d0ba | 7 | AnalogIn in(p19); |
| marcozecchini | 0:9fca2b23d0ba | 8 | #endif |
| marcozecchini | 0:9fca2b23d0ba | 9 | |
| marcozecchini | 0:9fca2b23d0ba | 10 | int main() { |
| marcozecchini | 0:9fca2b23d0ba | 11 | while(1) { |
| marcozecchini | 0:9fca2b23d0ba | 12 | if(in > 0.5) { |
| marcozecchini | 0:9fca2b23d0ba | 13 | out = !out; |
| marcozecchini | 0:9fca2b23d0ba | 14 | } |
| marcozecchini | 0:9fca2b23d0ba | 15 | } |
| marcozecchini | 0:9fca2b23d0ba | 16 | } |