Mikhail Ozornin
/
mbed_blinky_407
main.cpp@1:07354c5f684b, 2019-08-18 (annotated)
- Committer:
- mno60
- Date:
- Sun Aug 18 15:29:17 2019 +0000
- Revision:
- 1:07354c5f684b
- Parent:
- 0:a53f0d4508c7
20190818
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mno60 | 0:a53f0d4508c7 | 1 | #include "mbed.h" |
mno60 | 1:07354c5f684b | 2 | //#include "test_env.h" |
mno60 | 1:07354c5f684b | 3 | //#include "rtos.h" |
mno60 | 1:07354c5f684b | 4 | //#include "cmsis_os.h" |
mno60 | 1:07354c5f684b | 5 | //using namespace rtos; |
mno60 | 0:a53f0d4508c7 | 6 | |
mno60 | 1:07354c5f684b | 7 | DigitalOut myled(PD_15); |
mno60 | 1:07354c5f684b | 8 | DigitalOut myled2(PD_14); |
mno60 | 1:07354c5f684b | 9 | DigitalOut myled3(PD_13); |
mno60 | 1:07354c5f684b | 10 | DigitalOut myled4(PD_12); |
mno60 | 1:07354c5f684b | 11 | //DigitalOut myled5(D5); |
mno60 | 1:07354c5f684b | 12 | |
mno60 | 1:07354c5f684b | 13 | //Thread T1; |
mno60 | 0:a53f0d4508c7 | 14 | |
mno60 | 0:a53f0d4508c7 | 15 | int main() { |
mno60 | 0:a53f0d4508c7 | 16 | while(1) { |
mno60 | 0:a53f0d4508c7 | 17 | myled = 1; |
mno60 | 1:07354c5f684b | 18 | myled2 = 1; |
mno60 | 1:07354c5f684b | 19 | myled3 = 1; |
mno60 | 1:07354c5f684b | 20 | myled4 = 1; |
mno60 | 1:07354c5f684b | 21 | wait(0.5); |
mno60 | 0:a53f0d4508c7 | 22 | myled = 0; |
mno60 | 1:07354c5f684b | 23 | myled2 = 0; |
mno60 | 1:07354c5f684b | 24 | myled3 = 0; |
mno60 | 1:07354c5f684b | 25 | myled4 = 0; |
mno60 | 0:a53f0d4508c7 | 26 | wait(0.2); |
mno60 | 1:07354c5f684b | 27 | printf("H-ello, World"); |
mno60 | 0:a53f0d4508c7 | 28 | } |
mno60 | 0:a53f0d4508c7 | 29 | } |