FreeCalypso > hg > fc-magnetite
comparison src/condat3/com/include/rtc.h @ 201:f3f58412df01
src/condat3/com/include: pwr.h and rtc.h replaced with TCS211 versions
as part of the TCS2/TCS3 hybrid effort
| author | Mychaela Falconia <falcon@freecalypso.org> |
|---|---|
| date | Fri, 14 Oct 2016 05:49:28 +0000 |
| parents | c8bd5a927942 |
| children |
comparison
equal
deleted
inserted
replaced
| 200:876b6c569e36 | 201:f3f58412df01 |
|---|---|
| 15 | Texas Instruments Berlin, AG. | 15 | Texas Instruments Berlin, AG. |
| 16 +----------------------------------------------------------------------------- | 16 +----------------------------------------------------------------------------- |
| 17 | Purpose : Type definitions and function prototypes for the real time clock driver | 17 | Purpose : Type definitions and function prototypes for the real time clock driver |
| 18 | SPR 1725, re-wrote file for new RTC driver implementation. | 18 | SPR 1725, re-wrote file for new RTC driver implementation. |
| 19 +----------------------------------------------------------------------------- | 19 +----------------------------------------------------------------------------- |
| 20 | |
| 21 Aug 02, 2006 REF:OMAPS00083404 Prabakar R (a0393213) | |
| 22 Description: Removal of clone code: entity GDI | |
| 23 Solution: Two similar functions(rtc_get_time_date() and rtc_get_alarm()) are made into one function rtc_get_time_date(). | |
| 24 As a result, interface for rtc_get_time_date() has been changed. The change is only for locosto. | |
| 25 */ | 20 */ |
| 26 | 21 |
| 27 #ifndef DEF_RTC__H | 22 #ifndef DEF_RTC__H |
| 28 #define DEF_RTC__H | 23 #define DEF_RTC__H |
| 29 /*==== INCLUDES ===================================================*/ | 24 /*==== INCLUDES ===================================================*/ |
| 56 UBYTE second; | 51 UBYTE second; |
| 57 T_RTC_TIME_FORMAT format; | 52 T_RTC_TIME_FORMAT format; |
| 58 BOOL PM_flag; | 53 BOOL PM_flag; |
| 59 } T_RTC_TIME; | 54 } T_RTC_TIME; |
| 60 | 55 |
| 61 /* | |
| 62 Aug 02, 2006 REF:OMAPS00083404 Prabakar R (a0393213) | |
| 63 Description: Removal of clone code: entity GDI | |
| 64 Solution: Two similar functions(rtc_get_time_date() and rtc_get_alarm()) are made into one function rtc_get_time_date(). | |
| 65 This type is added to differenciate the functionality in the function. | |
| 66 */ | |
| 67 typedef enum | |
| 68 { | |
| 69 RTC_TIME_TYPE_CURRENT, | |
| 70 RTC_TIME_TYPE_ALARM | |
| 71 } T_RTC_TIME_TYPE; | |
| 72 | |
| 73 typedef void (*RtcCallback) (void*); /* RTC event handler */ | 56 typedef void (*RtcCallback) (void*); /* RTC event handler */ |
| 74 | 57 |
| 75 /* | 58 /* |
| 76 * Prototypes | 59 * Prototypes |
| 77 */ | 60 */ |
| 79 | 62 |
| 80 BOOL rtc_clock_cleared();// wrapper for RTC_RtcReset(); | 63 BOOL rtc_clock_cleared();// wrapper for RTC_RtcReset(); |
| 81 | 64 |
| 82 UBYTE rtc_set_time_date(T_RTC_DATE* date, T_RTC_TIME* time); // wrapper for RTC_setTimeDate(); | 65 UBYTE rtc_set_time_date(T_RTC_DATE* date, T_RTC_TIME* time); // wrapper for RTC_setTimeDate(); |
| 83 | 66 |
| 84 /* | 67 UBYTE rtc_get_time_date(T_RTC_DATE* date, T_RTC_TIME* time); // wrapper for RTC_getTimeDate(); |
| 85 Aug 02, 2006 REF:OMAPS00083404 Prabakar R (a0393213) | |
| 86 Description: Removal of clone code: entity GDI | |
| 87 Solution: Two similar functions(rtc_get_time_date() and rtc_get_alarm()) are made into one function rtc_get_time_date() | |
| 88 As a result interface of rtc_get_time_date() has been changed. A new parameter 'type' has been added. | |
| 89 | |
| 90 */ | |
| 91 UBYTE rtc_get_time_date(T_RTC_DATE* date, T_RTC_TIME* time , T_RTC_TIME_TYPE type ); // wrapper for RTC_getTimeDate(); | |
| 92 | 68 |
| 93 UBYTE rtc_set_alarm(T_RTC_DATE* date , T_RTC_TIME* time, RtcCallback callback_func );//wrapper for RTC_setAlarm(); | 69 UBYTE rtc_set_alarm(T_RTC_DATE* date , T_RTC_TIME* time, RtcCallback callback_func );//wrapper for RTC_setAlarm(); |
| 94 | 70 |
| 95 /* | 71 UBYTE rtc_get_alarm(T_RTC_DATE* date, T_RTC_TIME* time);//wrapper for RTC_getAlarm(); |
| 96 Aug 02, 2006 REF:OMAPS00083404 Prabakar R (a0393213) | |
| 97 Description: Removal of clone code: entity GDI | |
| 98 Solution: Two similar functions(rtc_get_time_date() and rtc_get_alarm()) are made into one function rtc_get_time_date() | |
| 99 So rtc_get_alarm() is removed. To get the time which is set for alarm, use rtc_get_time_date() with RTC_TIME_TYPE_ALARM as third argument | |
| 100 */ | |
| 101 | 72 |
| 102 UBYTE rtc_unset_alarm();//wrapper for RTC_UnsetAlarm(); | 73 UBYTE rtc_unset_alarm();//wrapper for RTC_UnsetAlarm(); |
| 103 | 74 |
| 104 UBYTE rtc_set_time_format(T_RTC_TIME_FORMAT format);//wrapper for RTC_Set12HourMode(); | 75 UBYTE rtc_set_time_format(T_RTC_TIME_FORMAT format);//wrapper for RTC_Set12HourMode(); |
| 105 | 76 |
