czxc

Committer:
thegecko
Date:
Wed Oct 11 13:17:33 2017 +0000
Revision:
0:103bac868627
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
thegecko 0:103bac868627 1 /*
thegecko 0:103bac868627 2 * PackageLicenseDeclared: Apache-2.0
thegecko 0:103bac868627 3 * Copyright (c) 2015 ARM Limited
thegecko 0:103bac868627 4 *
thegecko 0:103bac868627 5 * Licensed under the Apache License, Version 2.0 (the "License");
thegecko 0:103bac868627 6 * you may not use this file except in compliance with the License.
thegecko 0:103bac868627 7 * You may obtain a copy of the License at
thegecko 0:103bac868627 8 *
thegecko 0:103bac868627 9 * http://www.apache.org/licenses/LICENSE-2.0
thegecko 0:103bac868627 10 *
thegecko 0:103bac868627 11 * Unless required by applicable law or agreed to in writing, software
thegecko 0:103bac868627 12 * distributed under the License is distributed on an "AS IS" BASIS,
thegecko 0:103bac868627 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
thegecko 0:103bac868627 14 * See the License for the specific language governing permissions and
thegecko 0:103bac868627 15 * limitations under the License.
thegecko 0:103bac868627 16 */
thegecko 0:103bac868627 17
thegecko 0:103bac868627 18 #include "mbed-drivers/mbed.h"
thegecko 0:103bac868627 19
thegecko 0:103bac868627 20
thegecko 0:103bac868627 21 static void blinky(void) {
thegecko 0:103bac868627 22 static DigitalOut led(LED1);
thegecko 0:103bac868627 23
thegecko 0:103bac868627 24 led = !led;
thegecko 0:103bac868627 25 printf("LED = %d \n\r",led.read());
thegecko 0:103bac868627 26 }
thegecko 0:103bac868627 27
thegecko 0:103bac868627 28 void app_start(int, char**){
thegecko 0:103bac868627 29 // set 115200 baud rate for stdout
thegecko 0:103bac868627 30 static Serial pc(USBTX, USBRX);
thegecko 0:103bac868627 31 pc.baud(115200);
thegecko 0:103bac868627 32 minar::Scheduler::postCallback(blinky).period(minar::milliseconds(500));
thegecko 0:103bac868627 33 }
thegecko 0:103bac868627 34