FreeCalypso > hg > fc-magnetite
comparison src/condat2/com/include/rtc.h @ 3:93999a60b835
src/aci2, src/condat2: import of g23m/condat source pieces from TCS211
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 26 Sep 2016 00:29:36 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
2:c41a534f33c6 | 3:93999a60b835 |
---|---|
1 /* | |
2 +----------------------------------------------------------------------------- | |
3 | Project : GSM (6301) | |
4 | Modul : | |
5 +----------------------------------------------------------------------------- | |
6 | Copyright 2002 Texas Instruments Berlin, AG | |
7 | All rights reserved. | |
8 | | |
9 | This file is confidential and a trade secret of Texas | |
10 | Instruments Berlin, AG | |
11 | The receipt of or possession of this file does not convey | |
12 | any rights to reproduce or disclose its contents or to | |
13 | manufacture, use, or sell anything it may describe, in | |
14 | whole, or in part, without the specific written consent of | |
15 | Texas Instruments Berlin, AG. | |
16 +----------------------------------------------------------------------------- | |
17 | Purpose : Type definitions and function prototypes for the real time clock driver | |
18 | SPR 1725, re-wrote file for new RTC driver implementation. | |
19 +----------------------------------------------------------------------------- | |
20 */ | |
21 | |
22 #ifndef DEF_RTC__H | |
23 #define DEF_RTC__H | |
24 /*==== INCLUDES ===================================================*/ | |
25 #include <string.h> | |
26 #include "typedefs.h" | |
27 #include "gdi.h" | |
28 #include "kbd.h" | |
29 /*==== EXPORT =====================================================*/ | |
30 /* | |
31 * type definitions | |
32 */ | |
33 | |
34 | |
35 typedef enum | |
36 { | |
37 RTC_TIME_FORMAT_12HOUR, | |
38 RTC_TIME_FORMAT_24HOUR | |
39 } T_RTC_TIME_FORMAT; | |
40 | |
41 typedef struct { | |
42 UBYTE day; | |
43 UBYTE month; | |
44 USHORT year; | |
45 } T_RTC_DATE; | |
46 | |
47 | |
48 typedef struct | |
49 { UBYTE minute; | |
50 UBYTE hour; | |
51 UBYTE second; | |
52 T_RTC_TIME_FORMAT format; | |
53 BOOL PM_flag; | |
54 } T_RTC_TIME; | |
55 | |
56 typedef void (*RtcCallback) (void*); /* RTC event handler */ | |
57 | |
58 /* | |
59 * Prototypes | |
60 */ | |
61 | |
62 | |
63 BOOL rtc_clock_cleared();// wrapper for RTC_RtcReset(); | |
64 | |
65 UBYTE rtc_set_time_date(T_RTC_DATE* date, T_RTC_TIME* time); // wrapper for RTC_setTimeDate(); | |
66 | |
67 UBYTE rtc_get_time_date(T_RTC_DATE* date, T_RTC_TIME* time); // wrapper for RTC_getTimeDate(); | |
68 | |
69 UBYTE rtc_set_alarm(T_RTC_DATE* date , T_RTC_TIME* time, RtcCallback callback_func );//wrapper for RTC_setAlarm(); | |
70 | |
71 UBYTE rtc_get_alarm(T_RTC_DATE* date, T_RTC_TIME* time);//wrapper for RTC_getAlarm(); | |
72 | |
73 UBYTE rtc_unset_alarm();//wrapper for RTC_UnsetAlarm(); | |
74 | |
75 UBYTE rtc_set_time_format(T_RTC_TIME_FORMAT format);//wrapper for RTC_Set12HourMode(); | |
76 | |
77 | |
78 | |
79 | |
80 | |
81 #endif /* #ifndef DEF_RTC_H */ |