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.
Fork of mbed-dev by
Revision 165:2dd56e6daeec, committed 2017-05-23
- Comitter:
- ranaumarnaeem
- Date:
- Tue May 23 12:54:50 2017 +0000
- Parent:
- 164:289d4deac6e4
- Commit message:
- jhjg
Changed in this revision
targets/TARGET_NXP/TARGET_LPC176X/rtc_api.c | Show annotated file Show diff for this revision Revisions of this file |
--- a/targets/TARGET_NXP/TARGET_LPC176X/rtc_api.c Wed May 10 12:06:41 2017 +0100 +++ b/targets/TARGET_NXP/TARGET_LPC176X/rtc_api.c Tue May 23 12:54:50 2017 +0000 @@ -110,4 +110,13 @@ // Restart clock LPC_RTC->CCR &= ~((uint32_t)2); + + //set alarm time + LPC_RTC->ALSEC = timeinfo->tm_sec+10;//10 sec + + LPC_RTC->AMR &= (~(1 << 0)) & 0xFF; + + LPC_RTC->ILR = (1 << 0) | (1 << 1); + + printf("RTC Alarm Time Set\r\n"); }