Simplified version with classic style
Revision 5:4ac5e3650110, committed 2019-12-20
- Comitter:
- okano
- Date:
- Fri Dec 20 07:20:18 2019 +0000
- Parent:
- 4:52988b65027e
- Commit message:
- Simplified version with classic style
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 52988b65027e -r 4ac5e3650110 main.cpp
--- a/main.cpp Fri Nov 22 16:00:16 2019 +0000
+++ b/main.cpp Fri Dec 20 07:20:18 2019 +0000
@@ -2,18 +2,21 @@
* Copyright (c) 2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*/
+
+ /* mbed-fest hands-on session sample 1
+ * bare-metal blinky with classic style code
+ */
#include "mbed.h"
-#define WAIT_TIME 500 //msec
-
-DigitalOut led1(LED1);
+DigitalOut myled( LED1 );
int main()
{
- while (true)
- {
- led1 = !led1;
- thread_sleep_for(WAIT_TIME);
+ while ( true ) {
+ myled = 1;
+ wait( 0.5 );
+ myled = 0;
+ wait( 0.5 );
}
}