Tedd OKANO
/
mbed-os-example-blinky-baremetal
Simplified version with classic style
main.cpp@5:4ac5e3650110, 2019-12-20 (annotated)
- Committer:
- okano
- Date:
- Fri Dec 20 07:20:18 2019 +0000
- Revision:
- 5:4ac5e3650110
- Parent:
- 3:13a75fd3a983
Simplified version with classic style
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
kgilbert | 0:5ee0fb58a1c8 | 1 | /* mbed Microcontroller Library |
kgilbert | 0:5ee0fb58a1c8 | 2 | * Copyright (c) 2019 ARM Limited |
kgilbert | 0:5ee0fb58a1c8 | 3 | * SPDX-License-Identifier: Apache-2.0 |
kgilbert | 0:5ee0fb58a1c8 | 4 | */ |
okano | 5:4ac5e3650110 | 5 | |
okano | 5:4ac5e3650110 | 6 | /* mbed-fest hands-on session sample 1 |
okano | 5:4ac5e3650110 | 7 | * bare-metal blinky with classic style code |
okano | 5:4ac5e3650110 | 8 | */ |
kgilbert | 0:5ee0fb58a1c8 | 9 | |
kgilbert | 0:5ee0fb58a1c8 | 10 | #include "mbed.h" |
kgilbert | 0:5ee0fb58a1c8 | 11 | |
okano | 5:4ac5e3650110 | 12 | DigitalOut myled( LED1 ); |
kgilbert | 0:5ee0fb58a1c8 | 13 | |
kgilbert | 0:5ee0fb58a1c8 | 14 | int main() |
kgilbert | 0:5ee0fb58a1c8 | 15 | { |
okano | 5:4ac5e3650110 | 16 | while ( true ) { |
okano | 5:4ac5e3650110 | 17 | myled = 1; |
okano | 5:4ac5e3650110 | 18 | wait( 0.5 ); |
okano | 5:4ac5e3650110 | 19 | myled = 0; |
okano | 5:4ac5e3650110 | 20 | wait( 0.5 ); |
kgilbert | 1:d78c639f6b65 | 21 | } |
kgilbert | 0:5ee0fb58a1c8 | 22 | } |