m2mb API docs  30.00.007
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;
40  UINT8 mon;
41  UINT16 year;
42  INT16 tz; // Time Zone
43  UINT8 dlst; // Daylight Saving Time
45 
46 typedef struct
47 {
48  UINT32 sec;
49  UINT32 msec;
51 
52 typedef enum
53 {
54  M2MB_RTC_IOCTL_GET_SYSTEM_TIME, /* Read system time */
55  M2MB_RTC_IOCTL_SET_SYSTEM_TIME, /* Set system time */
56  M2MB_RTC_IOCTL_SET_ALARM_TIME, /* Set time for a specific alarm */
57  M2MB_RTC_IOCTL_CLEAR_ALARM, /* Clear a specific alarm */
58  M2MB_RTC_IOCTL_GET_TIMEVAL, /* Get current time in timeval format. Epoch: 1970/01/01-00:00:00 */
59  M2MB_RTC_IOCTL_SET_TIMEVAL /* Set current time in timeval format. Epoch: 1970/01/01-00:00:00 */
60 } M2MB_RTC_IOCTL_REQUEST_E;
61 
62 
63 /* Global functions =============================================================================*/
64 /*-----------------------------------------------------------------------------------------------*/
88 /*-----------------------------------------------------------------------------------------------*/
89 INT32 m2mb_rtc_open( const CHAR *path, INT32 flags, ... );
90 
91 /*-----------------------------------------------------------------------------------------------*/
115 /*-----------------------------------------------------------------------------------------------*/
116 INT32 m2mb_rtc_close( INT32 fd );
117 
118 /*-----------------------------------------------------------------------------------------------*/
154 /*-----------------------------------------------------------------------------------------------*/
155 INT32 m2mb_rtc_ioctl( INT32 fd, INT32 request, ... );
156 
157 
158 #endif /* M2M_M2MB_GNSS_API_H */
159 
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:46