m2mb API docs  25.30.003
m2mb API sets documentation
m2mb_rtc.h
Go to the documentation of this file.
1 /*===============================================================================================*/
2 /* >>> Copyright (C) Telit Communications S.p.A. Italy All Rights Reserved. <<< */
26 #ifndef M2M_M2MB_RTC_API_H
27 #define M2M_M2MB_RTC_API_H
28 
29 
30 /* Global declarations ==========================================================================*/
31 
32 
33 /* Global typedefs ==============================================================================*/
34 typedef struct
35 {
36  UINT8 sec;
37  UINT8 min;
38  UINT8 hour;
39  UINT8 day; /* the range for day depends either on the month and on the year it refers to.
40  Available ranges are: (01..28) (01..29) (01..30) (01..31) */
41  UINT8 mon;
42  UINT16 year; /* complete year, range is: ( 2000..2099) */
43  INT16 tz; /* Time Zone */
44  UINT8 dlst; /* Daylight Saving Time */
46 
47 typedef struct
48 {
49  UINT32 sec;
50  UINT32 msec;
52 
53 typedef enum
54 {
55  M2MB_RTC_IOCTL_GET_SYSTEM_TIME, /* Read system time */
56  M2MB_RTC_IOCTL_SET_SYSTEM_TIME, /* Set system time */
57  M2MB_RTC_IOCTL_SET_ALARM_TIME, /* Set time for a specific alarm */
58  M2MB_RTC_IOCTL_CLEAR_ALARM, /* Clear a specific alarm */
59  M2MB_RTC_IOCTL_GET_TIMEVAL, /* Get current time in timeval format. Epoch: 1970/01/01-00:00:00 */
60  M2MB_RTC_IOCTL_SET_TIMEVAL /* Set current time in timeval format. Epoch: 1970/01/01-00:00:00 */
61 } M2MB_RTC_IOCTL_REQUEST_E;
62 
63 
64 /* Global functions =============================================================================*/
65 /*-----------------------------------------------------------------------------------------------*/
89 /*-----------------------------------------------------------------------------------------------*/
90 INT32 m2mb_rtc_open( const CHAR *path, INT32 flags, ... );
91 
92 /*-----------------------------------------------------------------------------------------------*/
116 /*-----------------------------------------------------------------------------------------------*/
117 INT32 m2mb_rtc_close( INT32 fd );
118 
119 /*-----------------------------------------------------------------------------------------------*/
155 /*-----------------------------------------------------------------------------------------------*/
156 INT32 m2mb_rtc_ioctl( INT32 fd, INT32 request, ... );
157 
158 
159 #endif /* M2M_M2MB_GNSS_API_H */
160 
m2mb_rtc_close
INT32 m2mb_rtc_close(INT32 fd)
Close a RTC device.
m2mb_rtc_open
INT32 m2mb_rtc_open(const CHAR *path, INT32 flags,...)
Open a RTC device.
M2MB_RTC_TIME_T
Definition: m2mb_rtc.h:34
m2mb_rtc_ioctl
INT32 m2mb_rtc_ioctl(INT32 fd, INT32 request,...)
Configure a RTC device.
M2MB_RTC_TIMEVAL_T
Definition: m2mb_rtc.h:47