xx

Committer:
danteeickhoff
Date:
Sun Dec 09 22:34:28 2018 +0000
Revision:
0:5aa0f12e7698
xx

Who changed what in which revision?

UserRevisionLine numberNew contents of line
danteeickhoff 0:5aa0f12e7698 1 /* mbed Microcontroller Library
danteeickhoff 0:5aa0f12e7698 2 * Copyright (c) 2018 ARM Limited
danteeickhoff 0:5aa0f12e7698 3 * SPDX-License-Identifier: Apache-2.0
danteeickhoff 0:5aa0f12e7698 4 */
danteeickhoff 0:5aa0f12e7698 5
danteeickhoff 0:5aa0f12e7698 6 #include "mbed.h"
danteeickhoff 0:5aa0f12e7698 7 #include "stats_report.h"
danteeickhoff 0:5aa0f12e7698 8
danteeickhoff 0:5aa0f12e7698 9 DigitalOut led1(LED1);
danteeickhoff 0:5aa0f12e7698 10
danteeickhoff 0:5aa0f12e7698 11 // main() runs in its own thread in the OS
danteeickhoff 0:5aa0f12e7698 12 int main()
danteeickhoff 0:5aa0f12e7698 13 {
danteeickhoff 0:5aa0f12e7698 14 SystemReport sys_state(500 /* Loop delay time in ms */);
danteeickhoff 0:5aa0f12e7698 15
danteeickhoff 0:5aa0f12e7698 16 while (true) {
danteeickhoff 0:5aa0f12e7698 17 // Blink LED and wait 0.5 seconds
danteeickhoff 0:5aa0f12e7698 18 led1 = !led1;
danteeickhoff 0:5aa0f12e7698 19 wait(0.5f);
danteeickhoff 0:5aa0f12e7698 20
danteeickhoff 0:5aa0f12e7698 21 // Following the main thread wait, report on the current system status
danteeickhoff 0:5aa0f12e7698 22 sys_state.report_state();
danteeickhoff 0:5aa0f12e7698 23 }
danteeickhoff 0:5aa0f12e7698 24 }