initial commit of kl25z rtc code. local changes for debug

Dependents:   demo_FRDM_RTC

Fork of KL25Z_RTC by clemente di caprio

Revision:
2:56a50064749e
Parent:
1:2e81444e49a9
Child:
3:2cee0b9ac1ff
--- a/KL25Z_RTC.h	Tue Jun 18 08:46:50 2013 +0000
+++ b/KL25Z_RTC.h	Wed Jun 19 09:03:44 2013 +0000
@@ -21,6 +21,42 @@
 
 #include "mbed.h"
 
+// Usage:
+// #include "mbed.h"
+// #include "KL25Z_RTC.h"
+// 
+// DigitalOut myled(LED1);
+// KL25Z_RTC rtc( 15);
+// Serial pc(USBTX, USBRX);
+// 
+// void alm ( void);
+// void sec ( void);
+// 
+// int main() {
+//     
+//     pc.baud( 230400);
+//     pc.printf("RTC Management.\r\n");
+// 
+//     rtc.RTC_Start( &sec, &alm);
+// 
+//     while(1) {
+//         // pc.printf("RTC [%0d].\r\n", rtc.RTC_Read());
+//         wait( 1.0);
+//     }
+// }
+// 
+// void sec ( void)
+// {
+//     pc.printf("sec\r\n");
+// }
+// 
+// void alm ( void)
+// {
+//     pc.printf("alrm\r\n");
+// }    
+//
+
+
 class KL25Z_RTC
 {
 public:
@@ -28,6 +64,7 @@
     void RTC_Start( void);
     void RTC_Start( void(*sec_ptr)(void), void(*alrm_ptr)(void));
     unsigned int RTC_GetAlarm( void);
+    void RTC_SetAlarm( unsigned int alarm);
     unsigned int RTC_Read( void);
     void RTC_Seconds_CallBack( void(*fptr)(void));