test

Committer:
MarkRaveHome
Date:
Wed Jan 15 21:51:41 2020 +0000
Revision:
0:6500e4c5ebd3
Test for studio

Who changed what in which revision?

UserRevisionLine numberNew contents of line
MarkRaveHome 0:6500e4c5ebd3 1 /* mbed Microcontroller Library
MarkRaveHome 0:6500e4c5ebd3 2 * Copyright (c) 2019 ARM Limited
MarkRaveHome 0:6500e4c5ebd3 3 * SPDX-License-Identifier: Apache-2.0
MarkRaveHome 0:6500e4c5ebd3 4 */
MarkRaveHome 0:6500e4c5ebd3 5
MarkRaveHome 0:6500e4c5ebd3 6 #include "mbed.h"
MarkRaveHome 0:6500e4c5ebd3 7 #include "platform/mbed_thread.h"
MarkRaveHome 0:6500e4c5ebd3 8
MarkRaveHome 0:6500e4c5ebd3 9
MarkRaveHome 0:6500e4c5ebd3 10 // Blinking rate in milliseconds
MarkRaveHome 0:6500e4c5ebd3 11 #define BLINKING_RATE_MS 2000
MarkRaveHome 0:6500e4c5ebd3 12
MarkRaveHome 0:6500e4c5ebd3 13
MarkRaveHome 0:6500e4c5ebd3 14 int main()
MarkRaveHome 0:6500e4c5ebd3 15 {
MarkRaveHome 0:6500e4c5ebd3 16 // Initialise the digital pin LED1 as an output
MarkRaveHome 0:6500e4c5ebd3 17 DigitalOut led(LED1);
MarkRaveHome 0:6500e4c5ebd3 18
MarkRaveHome 0:6500e4c5ebd3 19 while (true) {
MarkRaveHome 0:6500e4c5ebd3 20 led = !led;
MarkRaveHome 0:6500e4c5ebd3 21 thread_sleep_for(BLINKING_RATE_MS);
MarkRaveHome 0:6500e4c5ebd3 22 }
MarkRaveHome 0:6500e4c5ebd3 23 }