a
Dependencies: CheckRTC mbed mbed
Revision 0:e99d6df2cc36, committed 2015-08-13
- Comitter:
- jhon309
- Date:
- Thu Aug 13 00:21:23 2015 +0000
- Commit message:
- .
Changed in this revision
diff -r 000000000000 -r e99d6df2cc36 CheckRTC.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CheckRTC.lib Thu Aug 13 00:21:23 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/kenjiArai/code/CheckRTC/#babcde30190d
diff -r 000000000000 -r e99d6df2cc36 GettingStarted.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/GettingStarted.htm Thu Aug 13 00:21:23 2015 +0000 @@ -0,0 +1,1 @@ +<meta http-equiv="refresh" content="0; url=http://mbed.org/handbook/Getting-Started-mbed-Exporters#zip"/> \ No newline at end of file
diff -r 000000000000 -r e99d6df2cc36 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Aug 13 00:21:23 2015 +0000 @@ -0,0 +1,48 @@ +/// Include --------------------------------------------------------------------------------------- +#include "mbed.h" + +#include "CheckRTC.h" + +// Object ---------------------------------------------------------------------------------------- +Serial pc(SERIAL_TX, SERIAL_RX); +DigitalOut myled1(LED1); // Assign LED1 output port + + + +// Function prototypes --------------------------------------------------------------------------- + +// Definition ------------------------------------------------------------------------------------ + + +//------------------------------------------------------------------------------------------------- +// Control Program +//------------------------------------------------------------------------------------------------- + + +int main() +{ + + time_t seconds; + char buf[64]; + struct tm t; + + t.tm_year = 15 + 100; + t.tm_mon = 7 - 1; + t.tm_mday = 29; + t.tm_hour = 23; + t.tm_min = 57; + t.tm_sec = 00; + seconds = mktime(&t); + set_time(seconds); + + + for (;;) { + seconds = time(NULL); + strftime(buf,40, "%I:%M:%S %p (%Y/%m/%d)", localtime(&seconds)); + wait(1); + myled1 =! myled1; + pc.printf("%s\r\n",buf); + } + + +}
diff -r 000000000000 -r e99d6df2cc36 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Aug 13 00:21:23 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/bad568076d81 \ No newline at end of file
diff -r 000000000000 -r e99d6df2cc36 mbed.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.lib Thu Aug 13 00:21:23 2015 +0000 @@ -0,0 +1,1 @@ +https://developer.mbed.org/users/jhon309/code/mbed/#88e313c910d0