/* --------------------------------------------------------------------------- * rtc.h - v0.1 (c) 2007 Micro-key bv * --------------------------------------------------------------------------- * Micro-key bv * Industrieweg 28, 9804 TG Noordhorn * Postbus 92, 9800 AB Zuidhorn * The Netherlands * Tel: +31 594 503020 * Fax: +31 594 505825 * Email: support@microkey.nl * Web: www.microkey.nl * --------------------------------------------------------------------------- * Description: Real Time Clock interface. * --------------------------------------------------------------------------- * Version(s): 0.1, 10-09-2007, Marcel Mulder. * Creation. * --------------------------------------------------------------------------- */ #ifndef __RTC_H__ #define __RTC_H__ /** \file rtc.h \brief Real Time Clock interface. */ /* --------------------------------------------------------------------------- * System include files. * --------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------- * Application include files. * --------------------------------------------------------------------------- */ #include "lpc23xx.h" #include "types.h" /* --------------------------------------------------------------------------- * Constant and macro definitions. * --------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------- * Type definitions. * --------------------------------------------------------------------------- */ typedef struct t_RTC { UINT8 sec; /**< Seconds */ UINT8 min; /**< Minutes */ UINT8 hour; /**< Hours */ UINT8 day; /**< Day */ UINT8 dow; /**< Day of week (0..7) */ UINT8 mon; /**< Month */ UINT8 dom; /**< Day of month */ UINT16 year; /**< Year */ UINT16 doy; /**< Day of year */ } t_rtc; /* --------------------------------------------------------------------------- * Variable declarations. * --------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------- * Function declarations. * --------------------------------------------------------------------------- */ /** \brief Initialize logging interface.*/ void rtcInit (void); /** \brief Read real time clock.*/ void rtcRead ( t_rtc * time ); /** \brief Write to real time clock.*/ void rtcWrite ( t_rtc * time ); // Alarms #endif /* __RTC_H__ */