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