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.
Revision 2:186958aacaef, committed 2017-05-12
- Comitter:
- Rhyme
- Date:
- Fri May 12 01:33:08 2017 +0000
- Parent:
- 1:0905f4f08461
- Commit message:
- Some clean ups and added title print
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
vt100.lib | Show diff for this revision Revisions of this file |
diff -r 0905f4f08461 -r 186958aacaef main.cpp --- a/main.cpp Fri May 12 00:54:59 2017 +0000 +++ b/main.cpp Fri May 12 01:33:08 2017 +0000 @@ -1,5 +1,4 @@ #include "mbed.h" -#include "vt100.h" #include "MSS.h" #include "RTC8564.h" @@ -16,17 +15,8 @@ 0 } ; -DigitalOut myled(LED1); -vt100 *tty = 0 ; RTC8564 *rtc = 0 ; -void init_hardware(void) -{ - tty = new vt100() ; - tty->cls() ; - rtc = new RTC8564(PIN_SDA, PIN_SCL, RTC8564_I2C_ADDRESS) ; -} - void dumpData(uint8_t data[]) { int i ; @@ -96,18 +86,11 @@ } int main() { - uint8_t data[16] ; - init_hardware() ; - rtc->getAll(data) ; - dumpData(data) ; + rtc = new RTC8564(PIN_SDA, PIN_SCL, RTC8564_I2C_ADDRESS) ; + printf("=== test RTC8564 for %s (%s) ===\n",BOARD_NAME, __DATE__) ; setTime() ; while(1){ - // rtc->getAll(data) ; - // dumpData(data) ; printTime() ; - myled = 1 ; - wait(0.5) ; - myled = 0 ; - wait(0.5) ; + wait(1) ; } }
diff -r 0905f4f08461 -r 186958aacaef vt100.lib --- a/vt100.lib Fri May 12 00:54:59 2017 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -https://mbed.org/users/Rhyme/code/vt100/#b7229a9eae1c