no-OS
no_os_rtc.h
Go to the documentation of this file.
1 /***************************************************************************/
34 #ifndef _NO_OS_RTC_H_
35 #define _NO_OS_RTC_H_
36 
37 /******************************************************************************/
38 /***************************** Include Files **********************************/
39 /******************************************************************************/
40 
41 #include <stdint.h>
42 
43 /******************************************************************************/
44 /*************************** Types Declarations *******************************/
45 /******************************************************************************/
46 
53  uint8_t id;
55  uint32_t freq;
57  uint32_t load;
59  void *extra;
60 };
61 
68  uint8_t id;
70  uint32_t freq;
72  uint32_t load;
74  void *extra;
75 };
76 
77 /******************************************************************************/
78 /************************ Functions Declarations ******************************/
79 /******************************************************************************/
80 
82 int32_t no_os_rtc_init(struct no_os_rtc_desc **device,
84 
86 int32_t no_os_rtc_remove(struct no_os_rtc_desc *dev);
87 
89 int32_t no_os_rtc_start(struct no_os_rtc_desc *dev);
90 
92 int32_t no_os_rtc_stop(struct no_os_rtc_desc *dev);
93 
95 int32_t no_os_rtc_get_cnt(struct no_os_rtc_desc *dev, uint32_t *tmr_cnt);
96 
98 int32_t no_os_rtc_set_cnt(struct no_os_rtc_desc *dev, uint32_t tmr_cnt);
99 
101 int32_t no_os_rtc_set_irq_time(struct no_os_rtc_desc *dev, uint32_t irq_time);
102 
103 #endif // _NO_OS_RTC_H_
no_os_rtc_init_param::id
uint8_t id
Definition: no_os_rtc.h:68
no_os_rtc_set_cnt
int32_t no_os_rtc_set_cnt(struct no_os_rtc_desc *dev, uint32_t tmr_cnt)
Set the current count for the real time clock.
Definition: aducm3029_rtc.c:184
no_os_rtc_init_param
Structure holding RTC initialization parameters.
Definition: no_os_rtc.h:66
no_os_rtc_init
int32_t no_os_rtc_init(struct no_os_rtc_desc **device, struct no_os_rtc_init_param *init_param)
Initialize the RTC peripheral.
Definition: aducm3029_rtc.c:55
device
Definition: ad9361_util.h:69
no_os_rtc_desc::extra
void * extra
Definition: no_os_rtc.h:59
no_os_rtc_desc::load
uint32_t load
Definition: no_os_rtc.h:57
no_os_rtc_remove
int32_t no_os_rtc_remove(struct no_os_rtc_desc *dev)
Free the resources allocated by no_os_rtc_init().
Definition: aducm3029_rtc.c:117
no_os_rtc_init_param::extra
void * extra
Definition: no_os_rtc.h:74
no_os_rtc_desc
Structure holding RTC descriptor.
Definition: no_os_rtc.h:51
no_os_rtc_stop
int32_t no_os_rtc_stop(struct no_os_rtc_desc *dev)
Stop the real time clock.
Definition: aducm3029_rtc.c:154
no_os_rtc_get_cnt
int32_t no_os_rtc_get_cnt(struct no_os_rtc_desc *dev, uint32_t *tmr_cnt)
Get the current count for the real time clock.
Definition: aducm3029_rtc.c:171
no_os_rtc_init_param::load
uint32_t load
Definition: no_os_rtc.h:72
no_os_rtc_init_param::freq
uint32_t freq
Definition: no_os_rtc.h:70
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:113
no_os_rtc_set_irq_time
int32_t no_os_rtc_set_irq_time(struct no_os_rtc_desc *dev, uint32_t irq_time)
Set the current count for the real time clock.
Definition: maxim_rtc.c:187
no_os_rtc_start
int32_t no_os_rtc_start(struct no_os_rtc_desc *dev)
Start the real time clock.
Definition: aducm3029_rtc.c:138
no_os_rtc_desc::id
uint8_t id
Definition: no_os_rtc.h:53
no_os_rtc_desc::freq
uint32_t freq
Definition: no_os_rtc.h:55