Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
- Committer:
- kenjiArai
- Date:
- 2018-04-10
- Revision:
- 0:6eea047171a3
File content as of revision 0:6eea047171a3:
/*
* Mbed Application program / Blinky
*
* Copyright (c) 2018 Kenji Arai / JH1PJL
* http://www.page.sannet.ne.jp/kenjia/index.html
* http://mbed.org/users/kenjiArai/
* Created: April 10th, 2018
* Revised: April 10th, 2018
*/
// 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);
}
}