![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Adding mbed target to support WIM EVA STM32F2 board
Fork of wim_eva_stm32f1_board_support by
main.cpp@58:8461647d7e85, 2018-01-19 (annotated)
- Committer:
- aafanasj
- Date:
- Fri Jan 19 23:48:16 2018 +0000
- Revision:
- 58:8461647d7e85
- Parent:
- 29:0b58d21e87d6
First Demo
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Jonathan Austin |
0:2757d7abb7d9 | 1 | #include "mbed.h" |
Jonathan Austin |
0:2757d7abb7d9 | 2 | |
Jonathan Austin |
0:2757d7abb7d9 | 3 | DigitalOut led1(LED1); |
aafanasj | 58:8461647d7e85 | 4 | DigitalOut led2(LED2); |
aafanasj | 58:8461647d7e85 | 5 | DigitalOut led3(LED3); |
Jonathan Austin |
0:2757d7abb7d9 | 6 | |
Jonathan Austin |
1:846c97078558 | 7 | // main() runs in its own thread in the OS |
Jonathan Austin |
0:2757d7abb7d9 | 8 | int main() { |
Jonathan Austin |
0:2757d7abb7d9 | 9 | while (true) { |
aafanasj | 58:8461647d7e85 | 10 | led1.write(1); |
aafanasj | 58:8461647d7e85 | 11 | led2.write(0); |
aafanasj | 58:8461647d7e85 | 12 | led3.write(0); |
aafanasj | 58:8461647d7e85 | 13 | wait(0.5); |
aafanasj | 58:8461647d7e85 | 14 | |
aafanasj | 58:8461647d7e85 | 15 | led1.write(0); |
aafanasj | 58:8461647d7e85 | 16 | led2.write(1); |
aafanasj | 58:8461647d7e85 | 17 | led3.write(0); |
aafanasj | 58:8461647d7e85 | 18 | wait(0.5); |
aafanasj | 58:8461647d7e85 | 19 | |
aafanasj | 58:8461647d7e85 | 20 | led1.write(0); |
aafanasj | 58:8461647d7e85 | 21 | led2.write(0); |
aafanasj | 58:8461647d7e85 | 22 | led3.write(1); |
mbed_official | 22:af9dcf379926 | 23 | wait(0.5); |
Jonathan Austin |
0:2757d7abb7d9 | 24 | } |
Jonathan Austin |
0:2757d7abb7d9 | 25 | } |
Jonathan Austin |
1:846c97078558 | 26 |