Support KL25z requirements

Dependents:   kl25z_Usb_Logger

Fork of RTC by Erik -

RTC.h

Committer:
Sissors
Date:
2012-12-05
Revision:
0:39767ffe05e6
Child:
1:be9d058ee5c7

File content as of revision 0:39767ffe05e6:

#ifndef RTC_H
#define RTC_H

#include "mbed.h"


class RTC {
public:
    enum TimeUnit {Second, Minute, Hour, 
                    Day, Month, Year};

    static void attach(void (*function)(void), TimeUnit interval);
    
    static void alarm(void (*function)(void), tm time);
    
    static void alarmOff( void );

private:
    static void IRQHandler( void );

    static FunctionPointer attachCB[6];
    static FunctionPointer alarmCB;
    
    //If someone knows a nicer way to do this, please tell me
    static bool initialRun;


};

#endif