no-OS
pico_timer.h
Go to the documentation of this file.
1 /***************************************************************************/
39 #ifndef _PICO_TIMER_H_
40 #define _PICO_TIMER_H_
41 
42 /******************************************************************************/
43 /************************* Include Files **************************************/
44 /******************************************************************************/
45 
46 #include "no_os_timer.h"
47 
48 /******************************************************************************/
49 /************************* Variables Declarations *****************************/
50 /******************************************************************************/
51 
52 extern struct no_os_timer_desc *pico_alarm_desc[];
53 
54 /******************************************************************************/
55 /*************************** Types Declarations *******************************/
56 /******************************************************************************/
57 
64  uint64_t period;
65 };
66 
70 extern const struct no_os_timer_platform_ops pico_timer_ops;
71 
72 #endif // _PICO_TIMER_H_
no_os_timer_platform_ops
Structure holding timer function pointers that point to the platform specific function.
Definition: no_os_timer.h:99
pico_timer_ops
const struct no_os_timer_platform_ops pico_timer_ops
pico platform specific timer platform ops structure
Definition: pico_timer.c:287
pico_timer_get_elapsed_time_nsec
int32_t pico_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: pico_timer.c:276
no_os_timer_init_param::id
uint16_t id
Definition: no_os_timer.h:83
pico_timer_desc
pico platform specific timer descriptor
Definition: pico_timer.h:62
pico_timer_count_clk_get
int32_t pico_timer_count_clk_get(struct no_os_timer_desc *desc, uint32_t *freq_hz)
Get the timer clock frequency.
Definition: pico_timer.c:226
pico_timer_desc::period
uint64_t period
Definition: pico_timer.h:64
no_os_timer.h
Timer control module header.
pico_timer_ops
const struct no_os_timer_platform_ops pico_timer_ops
pico specific timer platform ops structure
Definition: pico_timer.c:287
no_os_timer_init_param::ticks_count
uint32_t ticks_count
Definition: no_os_timer.h:87
pico_alarm_desc
struct no_os_timer_desc * pico_alarm_desc[PICO_ALARM_MAX_NB]
Definition: pico_timer.c:61
pico_timer_counter_set
int32_t pico_timer_counter_set(struct no_os_timer_desc *desc, uint32_t new_val)
Set the timer counter register value.
Definition: pico_timer.c:213
no_os_error.h
Error codes definition.
no_os_timer_init_param::freq_hz
uint32_t freq_hz
Definition: no_os_timer.h:85
pico_timer_count_clk_set
int32_t pico_timer_count_clk_set(struct no_os_timer_desc *desc, uint32_t freq_hz)
Set the timer clock frequency.
Definition: pico_timer.c:242
no_os_timer_desc::ticks_count
uint32_t ticks_count
Definition: no_os_timer.h:63
no_os_timer_desc::id
uint16_t id
Definition: no_os_timer.h:59
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:101
no_os_timer_init_param
Structure holding the parameters for timer initialization.
Definition: no_os_timer.h:81
pico_timer_counter_get
int32_t pico_timer_counter_get(struct no_os_timer_desc *desc, uint32_t *counter)
Get the value of the counter register for the timer.
Definition: pico_timer.c:197
no_os_timer_desc::freq_hz
uint32_t freq_hz
Definition: no_os_timer.h:61
NULL
#define NULL
Definition: wrapper.h:64
pico_alarm_desc
struct no_os_timer_desc * pico_alarm_desc[]
Definition: pico_timer.c:61
pico_timer_start
int32_t pico_timer_start(struct no_os_timer_desc *desc)
Start a timer.
Definition: pico_timer.c:155
pico_timer.h
Header file for the pico timer driver.
no_os_timer_desc::extra
void * extra
Definition: no_os_timer.h:67
PICO_ALARM_MAX_NB
#define PICO_ALARM_MAX_NB
Definition: pico_timer.c:55
pico_timer_init
int32_t pico_timer_init(struct no_os_timer_desc **desc, const struct no_os_timer_init_param *param)
Initialize the timer peripheral.
Definition: pico_timer.c:73
pico_timer_stop
int32_t pico_timer_stop(struct no_os_timer_desc *desc)
Stop a timer from counting.
Definition: pico_timer.c:177
no_os_timer_desc
Structure holding timer descriptor.
Definition: no_os_timer.h:57
no_os_util.h
Header file of utility functions.
pico_timer_remove
int32_t pico_timer_remove(struct no_os_timer_desc *desc)
Free the resources allocated by no_os_timer_init().
Definition: pico_timer.c:137