no-OS
rtc_extra.h
Go to the documentation of this file.
1 /***************************************************************************/
40 #ifndef RTC_EXTRA_H_
41 #define RTC_EXTRA_H_
42 
43 /******************************************************************************/
44 /***************************** Include Files **********************************/
45 /******************************************************************************/
46 
47 #include <drivers/rtc/adi_rtc.h>
48 
49 /******************************************************************************/
50 /*************************** Types Declarations *******************************/
51 /******************************************************************************/
52 
74 };
75 
82  void *instance;
84  void *memory;
85 };
86 
87 #endif /* RTC_EXTRA_H_ */
IS_ERR_VALUE
#define IS_ERR_VALUE(x)
Definition: error.h:65
aducm_rtc_desc::memory
void * memory
Definition: rtc_extra.h:84
rtc_init
int32_t rtc_init(struct rtc_desc **device, struct rtc_init_param *init_param)
Initialize the RTC peripheral.
Definition: rtc.c:60
AUDCM_1HZ
@ AUDCM_1HZ
Definition: rtc_extra.h:73
aducm_rtc_desc
Structure holding ADuCM3029 specific RTC descriptor.
Definition: rtc_extra.h:80
AUDCM_512HZ
@ AUDCM_512HZ
Definition: rtc_extra.h:64
AUDCM_4HZ
@ AUDCM_4HZ
Definition: rtc_extra.h:71
AUDCM_2HZ
@ AUDCM_2HZ
Definition: rtc_extra.h:72
AUDCM_16384HZ
@ AUDCM_16384HZ
Definition: rtc_extra.h:59
pwm_init
int32_t pwm_init(struct pwm_desc **desc, const struct pwm_init_param *param)
Initialize the pwm axi generator and the handler associated with it.
Definition: pwm.c:151
rtc_desc
Structure holding RTC descriptor.
Definition: rtc.h:57
AUDCM_128HZ
@ AUDCM_128HZ
Definition: rtc_extra.h:66
AUDCM_4096HZ
@ AUDCM_4096HZ
Definition: rtc_extra.h:61
pwm_disable
int32_t pwm_disable(struct pwm_desc *desc)
Disable PWM generator device.
Definition: pwm.c:218
rtc_desc::freq
uint32_t freq
Definition: rtc.h:61
rtc_set_cnt
int32_t rtc_set_cnt(struct rtc_desc *dev, uint32_t tmr_cnt)
Set the current count for the real time clock.
Definition: rtc.c:188
PWM_POLARITY_HIGH
@ PWM_POLARITY_HIGH
Definition: pwm.h:57
rtc_extra.h
Header file of RTC driver for ADuCM302x.
AUDCM_16HZ
@ AUDCM_16HZ
Definition: rtc_extra.h:69
AUDCM_8HZ
@ AUDCM_8HZ
Definition: rtc_extra.h:70
device
Definition: ad9361_util.h:75
pwm_desc::polarity
enum pwm_polarity polarity
Definition: pwm.h:95
rtc_desc::extra
void * extra
Definition: rtc.h:65
pwm_init_param
Structure containing the init parameters needed by the PWM generator.
Definition: pwm.h:66
rtc_start
int32_t rtc_start(struct rtc_desc *dev)
Start the real time clock.
Definition: rtc.c:142
rtc_desc::load
uint32_t load
Definition: rtc.h:63
AUDCM_64HZ
@ AUDCM_64HZ
Definition: rtc_extra.h:67
pwm_set_period
int32_t pwm_set_period(struct pwm_desc *desc, uint32_t period_ns)
Set period of PWM generator device.
Definition: pwm.c:233
AUDCM_32768HZ
@ AUDCM_32768HZ
Definition: rtc_extra.h:58
pwm_set_polarity
int32_t pwm_set_polarity(struct pwm_desc *desc, enum pwm_polarity polarity)
Definition: pwm.c:281
pwm_desc::extra
void * extra
Definition: pwm.h:99
aducm_rtc_freq_opt
aducm_rtc_freq_opt
RTC nominal frequency options for ADuCM3029.
Definition: rtc_extra.h:57
pwm_polarity
pwm_polarity
Possible polarities of the PWM signal.
Definition: pwm.h:55
error.h
Error codes definition.
AUDCM_1024HZ
@ AUDCM_1024HZ
Definition: rtc_extra.h:63
rtc_get_cnt
int32_t rtc_get_cnt(struct rtc_desc *dev, uint32_t *tmr_cnt)
Get the current count for the real time clock.
Definition: rtc.c:175
pwm_desc::duty_cycle_ns
uint32_t duty_cycle_ns
Definition: pwm.h:91
AUDCM_256HZ
@ AUDCM_256HZ
Definition: rtc_extra.h:65
pwm_init_param::duty_cycle_ns
uint32_t duty_cycle_ns
Definition: pwm.h:72
pwm_set_duty_cycle
int32_t pwm_set_duty_cycle(struct pwm_desc *desc, uint32_t duty_cycle_ns)
Set duty cycle of PWM generator device.
Definition: pwm.c:257
NS_PER_SEC
#define NS_PER_SEC
Definition: pwm.c:46
rtc_desc::id
uint8_t id
Definition: rtc.h:59
irq.h
Header file of IRQ interface.
pwm_init_param::period_ns
uint32_t period_ns
Definition: pwm.h:70
pwm_desc
Structure representing an PWM generator device.
Definition: pwm.h:85
NULL
#define NULL
Definition: wrapper.h:64
pwm_remove
int32_t pwm_remove(struct pwm_desc *desc)
Free the memory allocated by axi_pwmgen_init().
Definition: pwm.c:191
SUCCESS
#define SUCCESS
Definition: error.h:52
init_param
struct ad7616_init_param init_param
Definition: ad7616_sdz.c:96
pwm_desc::id
uint32_t id
Definition: pwm.h:87
pwm_get_period
int32_t pwm_get_period(struct pwm_desc *desc, uint32_t *period_ns)
Get period of PWM generator device.
Definition: pwm.c:245
pwm_get_duty_cycle
int32_t pwm_get_duty_cycle(struct pwm_desc *desc, uint32_t *duty_cycle_ns)
Get duty cycle of PWM generator device.
Definition: pwm.c:269
rtc_init_param
Structure holding RTC initialization parameters.
Definition: rtc.h:72
rtc.h
Header of the RTC interface.
AUDCM_32HZ
@ AUDCM_32HZ
Definition: rtc_extra.h:68
AUDCM_8192HZ
@ AUDCM_8192HZ
Definition: rtc_extra.h:60
AUDCM_2048HZ
@ AUDCM_2048HZ
Definition: rtc_extra.h:62
pwm.h
Header file of PWM Interface.
pwm_init_param::id
uint32_t id
Definition: pwm.h:68
pwm_enable
int32_t pwm_enable(struct pwm_desc *desc)
Enable PWM generator device.
Definition: pwm.c:203
aducm_rtc_desc::instance
void * instance
Definition: rtc_extra.h:82
pwm_get_polarity
int32_t pwm_get_polarity(struct pwm_desc *desc, enum pwm_polarity *polarity)
Definition: pwm.c:293
rtc_stop
int32_t rtc_stop(struct rtc_desc *dev)
Stop the real time clock.
Definition: rtc.c:158
FAILURE
#define FAILURE
Definition: error.h:56
pwm_desc::period_ns
uint32_t period_ns
Definition: pwm.h:89
pwm_init_param::polarity
enum pwm_polarity polarity
Definition: pwm.h:76
rtc_remove
int32_t rtc_remove(struct rtc_desc *dev)
Free the resources allocated by rtc_init().
Definition: rtc.c:121