Go to the documentation of this file.
34 #ifndef ADUCM3029_TIMER_H
35 #define ADUCM3029_TIMER_H
43 #include <drivers/tmr/adi_tmr.h>
@ HFOSC_DIV64
Definition: aducm3029_timer.h:59
int32_t aducm3029_timer_start(struct no_os_timer_desc *desc)
Enable counting in the timer instance.
Definition: aducm3029_timer.c:251
uint16_t id
Definition: no_os_timer.h:85
@ LFOSC_DIV1
Definition: aducm3029_timer.h:61
int32_t aducm3029_timer_count_clk_set(struct no_os_timer_desc *desc, uint32_t freq_hz)
Set the frequency the timer counts with.
Definition: aducm3029_timer.c:407
Definition: aducm3029_timer.h:88
@ LFOSC_DIV256
Definition: aducm3029_timer.h:64
#define NO_OS_MHZ26_TO_US(count)
Definition: aducm3029_timer.c:60
@ LFXTAL_DIV256
Definition: aducm3029_timer.h:68
It stores instance values specific for the ADuCM302x implementation.
Definition: aducm3029_timer.h:75
Timer control module header.
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:54
@ LFOSC_DIV16
Definition: aducm3029_timer.h:62
avail_freqs
It lists the available source frequencies for timer instance 1.
Definition: aducm3029_timer.h:52
@ HFOSC_DIV1
Definition: aducm3029_timer.h:57
uint32_t ticks_count
Definition: no_os_timer.h:89
@ LFXTAL_DIV16
Definition: aducm3029_timer.h:66
uint32_t freq_hz
Definition: no_os_timer.h:87
#define NO_OS_HFOSC_LOAD
Definition: aducm3029_timer.c:54
uint32_t ticks_count
Definition: no_os_timer.h:65
uint16_t id
Definition: no_os_timer.h:61
ADI_TMR_CONFIG tmr_conf
Definition: aducm3029_timer.h:81
int32_t aducm3029_timer_stop(struct no_os_timer_desc *desc)
Stop counting the timer instance.
Definition: aducm3029_timer.c:282
@ LFXTAL_DIV1
Definition: aducm3029_timer.h:65
enum avail_freqs source_freq
Definition: aducm3029_timer.h:90
@ HFOSC_DIV16
Definition: aducm3029_timer.h:58
int32_t aducm3029_timer_counter_get(struct no_os_timer_desc *desc, uint32_t *counter)
Get the value the timer is at.
Definition: aducm3029_timer.c:314
int32_t aducm3029_timer_get_elapsed_time_nsec(struct no_os_timer_desc *desc, uint64_t *elapsed_time)
Get the elapsed time in nsec for the timer.
Definition: aducm3029_timer.c:424
uint64_t old_time
Definition: aducm3029_timer.h:77
bool started
Definition: aducm3029_timer.h:79
int32_t no_os_timer_counter_get(struct no_os_timer_desc *desc, uint32_t *counter)
Get the value of the counter register for the timer.
Definition: no_os_timer.c:138
@ HFOSC_DIV256
Definition: aducm3029_timer.h:60
Structure holding the parameters for timer initialization.
Definition: no_os_timer.h:83
int32_t aducm3029_timer_counter_set(struct no_os_timer_desc *desc, uint32_t new_val)
Set a new value for the timer.
Definition: aducm3029_timer.c:368
@ LFOSC_DIV64
Definition: aducm3029_timer.h:63
uint32_t freq_hz
Definition: no_os_timer.h:63
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:69
#define NULL
Definition: wrapper.h:64
@ PCLK_DIV1
Definition: aducm3029_timer.h:53
#define NO_OS_FREQ_1KHZ
Definition: aducm3029_timer.c:56
const struct no_os_timer_platform_ops aducm_timer_ops
aducm3029 platform specific timer platform ops structure
Definition: aducm3029_timer.c:434
void * extra
Definition: no_os_timer.h:69
void * extra
Definition: no_os_timer.h:93
int32_t aducm3029_timer_remove(struct no_os_timer_desc *desc)
Remove a instance of a timer.
Definition: aducm3029_timer.c:211
const struct no_os_timer_platform_ops aducm_timer_ops
aducm3029 specific timer platform ops structure
Definition: aducm3029_timer.c:434
@ PCLK_DIV64
Definition: aducm3029_timer.h:55
@ PCLK_DIV256
Definition: aducm3029_timer.h:56
Header file of TIMER driver for ADuCM302x.
@ PCLK_DIV16
Definition: aducm3029_timer.h:54
Structure holding timer descriptor.
Definition: no_os_timer.h:57
Header file of utility functions.
@ LFXTAL_DIV64
Definition: aducm3029_timer.h:67
#define NO_OS_FREQ_1MHZ
Definition: aducm3029_timer.c:58
int32_t aducm3029_timer_init(struct no_os_timer_desc **desc, const struct no_os_timer_init_param *param)
Initialize a instance of a timer.
Definition: aducm3029_timer.c:104
int32_t aducm3029_timer_count_clk_get(struct no_os_timer_desc *desc, uint32_t *freq_hz)
Get the frequency the timer counts with.
Definition: aducm3029_timer.c:389