no-OS
linux_timer.h
Go to the documentation of this file.
1 /***************************************************************************/
40 #ifndef LINUX_TIMER_H_
41 #define LINUX_TIMER_H_
42 
43 /******************************************************************************/
44 /***************************** Include Files **********************************/
45 /******************************************************************************/
46 #include "no_os_timer.h"
47 
51 extern const struct no_os_timer_platform_ops linux_timer_ops;
52 
53 #endif //LINUX_TIMER_H_
54 
no_os_timer_platform_ops
Structure holding timer function pointers that point to the platform specific function.
Definition: no_os_timer.h:107
no_os_alloc.h
no_os_timer_init_param::id
uint16_t id
Definition: no_os_timer.h:91
linux_timer_init
int linux_timer_init(struct no_os_timer_desc **desc, const struct no_os_timer_init_param *param)
Timer driver init function.
Definition: linux_timer.c:75
linux_timer_ops
const struct no_os_timer_platform_ops linux_timer_ops
Linux specific timer platform ops.
Definition: linux_timer.c:264
linux_timer_get_elapsed_time_nsec
int linux_timer_get_elapsed_time_nsec(struct no_os_timer_desc *desc, uint64_t *elapsed_time)
Not implemented.
Definition: linux_timer.c:244
linux_timer_desc
Linux platform specific timer descriptor.
Definition: linux_timer.c:59
linux_timer_start
int linux_timer_start(struct no_os_timer_desc *desc)
Timer count start function.
Definition: linux_timer.c:123
no_os_timer.h
Timer control module header.
no_os_calloc
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
linux_timer_count_clk_set
int linux_timer_count_clk_set(struct no_os_timer_desc *desc, uint32_t freq_hz)
Function to set the timer frequency.
Definition: linux_timer.c:232
no_os_timer_init_param::ticks_count
uint32_t ticks_count
Definition: no_os_timer.h:95
no_os_error.h
Error codes definition.
no_os_timer_init_param::freq_hz
uint32_t freq_hz
Definition: no_os_timer.h:93
linux_timer_remove
int linux_timer_remove(struct no_os_timer_desc *desc)
Timer driver remove function.
Definition: linux_timer.c:110
linux_timer_ops
const struct no_os_timer_platform_ops linux_timer_ops
linux platform specific timer platform ops structure
Definition: linux_timer.c:264
no_os_timer_desc::ticks_count
uint32_t ticks_count
Definition: no_os_timer.h:71
no_os_timer_desc::id
uint16_t id
Definition: no_os_timer.h:67
no_os_timer_platform_ops::init
int32_t(* init)(struct no_os_timer_desc **, const struct no_os_timer_init_param *)
Definition: no_os_timer.h:109
linux_timer_stop
int linux_timer_stop(struct no_os_timer_desc *desc)
Timer count stop function.
Definition: linux_timer.c:140
linux_timer_count_clk_get
int linux_timer_count_clk_get(struct no_os_timer_desc *desc, uint32_t *freq_hz)
Function to get the timer frequency.
Definition: linux_timer.c:218
no_os_timer_init_param
Structure holding the parameters for timer initialization.
Definition: no_os_timer.h:89
no_os_timer_desc::freq_hz
uint32_t freq_hz
Definition: no_os_timer.h:69
no_os_free
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
linux_timer_desc::enable
bool enable
Definition: linux_timer.c:61
no_os_timer_desc::extra
void * extra
Definition: no_os_timer.h:75
linux_timer_counter_get
int linux_timer_counter_get(struct no_os_timer_desc *desc, uint32_t *counter)
Function to get the current timer counter value.
Definition: linux_timer.c:157
no_os_timer_desc
Structure holding timer descriptor.
Definition: no_os_timer.h:63
linux_timer_counter_set
int linux_timer_counter_set(struct no_os_timer_desc *desc, uint32_t new_val)
Function to set the timer counter value.
Definition: linux_timer.c:191
linux_timer_desc::timer_id
timer_t timer_id
Definition: linux_timer.c:60
linux_timer_desc::start_time
struct timespec start_time
Definition: linux_timer.c:62