Go to the documentation of this file.
40 #ifndef ADUCM3029_TIMER_H
41 #define ADUCM3029_TIMER_H
49 #include <drivers/tmr/adi_tmr.h>
@ HFOSC_DIV64
Definition: aducm3029_timer.h:65
int32_t aducm3029_timer_start(struct no_os_timer_desc *desc)
Enable counting in the timer instance.
Definition: aducm3029_timer.c:257
uint16_t id
Definition: no_os_timer.h:91
@ LFOSC_DIV1
Definition: aducm3029_timer.h:67
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:413
Definition: aducm3029_timer.h:94
@ LFOSC_DIV256
Definition: aducm3029_timer.h:70
#define NO_OS_MHZ26_TO_US(count)
Definition: aducm3029_timer.c:66
@ LFXTAL_DIV256
Definition: aducm3029_timer.h:74
It stores instance values specific for the ADuCM302x implementation.
Definition: aducm3029_timer.h:81
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:60
@ LFOSC_DIV16
Definition: aducm3029_timer.h:68
avail_freqs
It lists the available source frequencies for timer instance 1.
Definition: aducm3029_timer.h:58
@ HFOSC_DIV1
Definition: aducm3029_timer.h:63
uint32_t ticks_count
Definition: no_os_timer.h:95
@ LFXTAL_DIV16
Definition: aducm3029_timer.h:72
uint32_t freq_hz
Definition: no_os_timer.h:93
#define NO_OS_HFOSC_LOAD
Definition: aducm3029_timer.c:60
uint32_t ticks_count
Definition: no_os_timer.h:71
uint16_t id
Definition: no_os_timer.h:67
ADI_TMR_CONFIG tmr_conf
Definition: aducm3029_timer.h:87
int32_t aducm3029_timer_stop(struct no_os_timer_desc *desc)
Stop counting the timer instance.
Definition: aducm3029_timer.c:288
@ LFXTAL_DIV1
Definition: aducm3029_timer.h:71
enum avail_freqs source_freq
Definition: aducm3029_timer.h:96
@ HFOSC_DIV16
Definition: aducm3029_timer.h:64
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:320
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:430
uint64_t old_time
Definition: aducm3029_timer.h:83
bool started
Definition: aducm3029_timer.h:85
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:144
@ HFOSC_DIV256
Definition: aducm3029_timer.h:66
Structure holding the parameters for timer initialization.
Definition: no_os_timer.h:89
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:374
@ LFOSC_DIV64
Definition: aducm3029_timer.h:69
uint32_t freq_hz
Definition: no_os_timer.h:69
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:75
#define NULL
Definition: wrapper.h:64
@ PCLK_DIV1
Definition: aducm3029_timer.h:59
#define NO_OS_FREQ_1KHZ
Definition: aducm3029_timer.c:62
const struct no_os_timer_platform_ops aducm_timer_ops
aducm3029 platform specific timer platform ops structure
Definition: aducm3029_timer.c:440
void * extra
Definition: no_os_timer.h:75
void * extra
Definition: no_os_timer.h:99
int32_t aducm3029_timer_remove(struct no_os_timer_desc *desc)
Remove a instance of a timer.
Definition: aducm3029_timer.c:217
const struct no_os_timer_platform_ops aducm_timer_ops
aducm3029 specific timer platform ops structure
Definition: aducm3029_timer.c:440
@ PCLK_DIV64
Definition: aducm3029_timer.h:61
@ PCLK_DIV256
Definition: aducm3029_timer.h:62
Header file of TIMER driver for ADuCM302x.
@ PCLK_DIV16
Definition: aducm3029_timer.h:60
Structure holding timer descriptor.
Definition: no_os_timer.h:63
Header file of utility functions.
@ LFXTAL_DIV64
Definition: aducm3029_timer.h:73
#define NO_OS_FREQ_1MHZ
Definition: aducm3029_timer.c:64
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:110
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:395