no-OS
no_os_rtc.h
Go to the documentation of this file.
1 /***************************************************************************/
40 #ifndef _NO_OS_RTC_H_
41 #define _NO_OS_RTC_H_
42 
43 /******************************************************************************/
44 /***************************** Include Files **********************************/
45 /******************************************************************************/
46 
47 #include <stdint.h>
48 
49 /******************************************************************************/
50 /*************************** Types Declarations *******************************/
51 /******************************************************************************/
52 
59  uint8_t id;
61  uint32_t freq;
63  uint32_t load;
65  void *extra;
66 };
67 
74  uint8_t id;
76  uint32_t freq;
78  uint32_t load;
80  void *extra;
81 };
82 
83 /******************************************************************************/
84 /************************ Functions Declarations ******************************/
85 /******************************************************************************/
86 
88 int32_t no_os_rtc_init(struct no_os_rtc_desc **device,
90 
92 int32_t no_os_rtc_remove(struct no_os_rtc_desc *dev);
93 
95 int32_t no_os_rtc_start(struct no_os_rtc_desc *dev);
96 
98 int32_t no_os_rtc_stop(struct no_os_rtc_desc *dev);
99 
101 int32_t no_os_rtc_get_cnt(struct no_os_rtc_desc *dev, uint32_t *tmr_cnt);
102 
104 int32_t no_os_rtc_set_cnt(struct no_os_rtc_desc *dev, uint32_t tmr_cnt);
105 
107 int32_t no_os_rtc_set_irq_time(struct no_os_rtc_desc *dev, uint32_t irq_time);
108 
109 #endif // _NO_OS_RTC_H_
no_os_rtc_init_param::id
uint8_t id
Definition: no_os_rtc.h:74
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:190
no_os_rtc_init_param
Structure holding RTC initialization parameters.
Definition: no_os_rtc.h:72
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:61
device
Definition: ad9361_util.h:75
no_os_rtc_desc::extra
void * extra
Definition: no_os_rtc.h:65
no_os_rtc_desc::load
uint32_t load
Definition: no_os_rtc.h:63
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:123
no_os_rtc_init_param::extra
void * extra
Definition: no_os_rtc.h:80
no_os_rtc_desc
Structure holding RTC descriptor.
Definition: no_os_rtc.h:57
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:160
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:177
no_os_rtc_init_param::load
uint32_t load
Definition: no_os_rtc.h:78
no_os_rtc_init_param::freq
uint32_t freq
Definition: no_os_rtc.h:76
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:119
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:193
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:144
no_os_rtc_desc::id
uint8_t id
Definition: no_os_rtc.h:59
no_os_rtc_desc::freq
uint32_t freq
Definition: no_os_rtc.h:61