Ricardo Silva
/
frdm_gpio
0
main.cpp@0:69185279cb50, 2016-01-20 (annotated)
- Committer:
- risilvaferraz
- Date:
- Wed Jan 20 19:25:37 2016 +0000
- Revision:
- 0:69185279cb50
0
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
risilvaferraz | 0:69185279cb50 | 1 | #include "mbed.h" |
risilvaferraz | 0:69185279cb50 | 2 | |
risilvaferraz | 0:69185279cb50 | 3 | DigitalOut gpo(D0); |
risilvaferraz | 0:69185279cb50 | 4 | DigitalOut led(LED_RED); |
risilvaferraz | 0:69185279cb50 | 5 | |
risilvaferraz | 0:69185279cb50 | 6 | int main() |
risilvaferraz | 0:69185279cb50 | 7 | { |
risilvaferraz | 0:69185279cb50 | 8 | while (true) { |
risilvaferraz | 0:69185279cb50 | 9 | gpo = !gpo; // toggle pin |
risilvaferraz | 0:69185279cb50 | 10 | led = !led; // toggle led |
risilvaferraz | 0:69185279cb50 | 11 | wait(0.2f); |
risilvaferraz | 0:69185279cb50 | 12 | } |
risilvaferraz | 0:69185279cb50 | 13 | } |