Projet_XXX / Mbed 2 deprecated Progression_Sys_V1

Dependencies:   mbed

Fork of DigitalIn_HelloWorld_Mbed by mbed official

Committer:
mbedAustin
Date:
Fri Mar 27 20:13:29 2015 +0000
Revision:
5:9b20ef58e04c
Parent:
4:e2f865861a7a
Child:
6:fa65447e171b
Added license to main.c file.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbedAustin 5:9b20ef58e04c 1 /* mbed Example Program
mbedAustin 5:9b20ef58e04c 2 * Copyright (c) 2006-2014 ARM Limited
mbedAustin 5:9b20ef58e04c 3 *
mbedAustin 5:9b20ef58e04c 4 * Licensed under the Apache License, Version 2.0 (the "License");
mbedAustin 5:9b20ef58e04c 5 * you may not use this file except in compliance with the License.
mbedAustin 5:9b20ef58e04c 6 * You may obtain a copy of the License at
mbedAustin 5:9b20ef58e04c 7 *
mbedAustin 5:9b20ef58e04c 8 * http://www.apache.org/licenses/LICENSE-2.0
mbedAustin 5:9b20ef58e04c 9 *
mbedAustin 5:9b20ef58e04c 10 * Unless required by applicable law or agreed to in writing, software
mbedAustin 5:9b20ef58e04c 11 * distributed under the License is distributed on an "AS IS" BASIS,
mbedAustin 5:9b20ef58e04c 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
mbedAustin 5:9b20ef58e04c 13 * See the License for the specific language governing permissions and
mbedAustin 5:9b20ef58e04c 14 * limitations under the License.
mbedAustin 5:9b20ef58e04c 15 */
mbed_official 0:aaf5a9d465fd 16 #include "mbed.h"
mbed_official 0:aaf5a9d465fd 17
mbed_official 0:aaf5a9d465fd 18 DigitalIn enable(p5);
mbed_official 0:aaf5a9d465fd 19 DigitalOut led(LED1);
mbed_official 0:aaf5a9d465fd 20
mbedAustin 4:e2f865861a7a 21 // blink LED when enable line is high
mbed_official 0:aaf5a9d465fd 22 int main() {
mbed_official 0:aaf5a9d465fd 23 while(1) {
mbed_official 0:aaf5a9d465fd 24 if(enable) {
mbed_official 0:aaf5a9d465fd 25 led = !led;
mbed_official 0:aaf5a9d465fd 26 }
mbed_official 0:aaf5a9d465fd 27 wait(0.25);
mbed_official 0:aaf5a9d465fd 28 }
mbed_official 0:aaf5a9d465fd 29 }