Kenji Arai / TYBLE16_mbedlized_os5_several_examples

Dependencies:   BME280 TextLCD nRF51_Vdd

Fork of TYBLE16_mbedlized_os5_BASE by Kenji Arai

0_Blinky_LED/main.cpp

Committer:
kenjiArai
Date:
2018-04-15
Revision:
3:c0010c8ad17f
Parent:
1:9011c83e4178

File content as of revision 3:c0010c8ad17f:

/*
 * Mbed Application program / Blinky
 *
 * Copyright (c) 2018 Kenji Arai / JH1PJL
 *  http://www.page.sannet.ne.jp/kenjia/index.html
 *  https://os.mbed.com/users/kenjiArai/
 *      Created:    April     10th, 2018
 *      Revised:    April     14th, 2018
 */

//#define EXAMPLE_0_BLINKY_LED
#ifdef EXAMPLE_0_BLINKY_LED

//  Include --------------------------------------------------------------------
#include "mbed.h"
#include "TYBLE16_BASE.h"

//  Definition -----------------------------------------------------------------

//  Constructor ----------------------------------------------------------------
DigitalOut  my_led(LED1);
Serial      pc(USBTX, USBRX);

//  RAM ------------------------------------------------------------------------

//  ROM / Constant data --------------------------------------------------------
char *const opngmsg =
    "\x1b[2J\x1b[H"__FILE__ "\r\n"__DATE__ " " __TIME__ " (UTC)\r\n""\r\n";

//  Function prototypes --------------------------------------------------------

//------------------------------------------------------------------------------
//  Control Program
//------------------------------------------------------------------------------
int main()
{
    uint32_t count = 0;

    pc.puts(opngmsg);
    // Check TYBLE-16 configuration
    cpu_sys();
    compile_condition();
    while(true) {
        my_led = !my_led;
        pc.printf("%8u\r\n", count++);
        Thread::wait(1000);
    }
}

#endif