mbed library sources. Supersedes mbed-src.

Fork of mbed-dev by Umar Naeem

Files at this revision

API Documentation at this revision

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");
 }