R1 code for micro:bit based train controller code, requires second micro:bit running rx code to operate - see https://meanderingpi.wordpress.com/ for more information

Fork of nrf51-sdk by Lancaster University

Embed: (wiki syntax)

« Back to documentation index

app_timer.h File Reference

app_timer.h File Reference

Go to the source code of this file.

Typedefs

typedef app_timer_t * app_timer_id_t
 Timer ID type.
typedef void(* app_timer_timeout_handler_t )(void *p_context)
 Application time-out handler type.
typedef uint32_t(* app_timer_evt_schedule_func_t )(app_timer_timeout_handler_t timeout_handler, void *p_context)
 Type of function for passing events from the timer module to the scheduler.

Enumerations

enum  app_timer_mode_t { APP_TIMER_MODE_SINGLE_SHOT, APP_TIMER_MODE_REPEATED }
 

Timer modes.

More...

Functions

uint32_t app_timer_init (uint32_t prescaler, uint8_t op_queues_size, void *p_buffer, app_timer_evt_schedule_func_t evt_schedule_func)
 Function for initializing the timer module.
uint32_t app_timer_create (app_timer_id_t const *p_timer_id, app_timer_mode_t mode, app_timer_timeout_handler_t timeout_handler)
 Function for creating a timer instance.
uint32_t app_timer_start (app_timer_id_t timer_id, uint32_t timeout_ticks, void *p_context)
 Function for starting a timer.
uint32_t app_timer_stop (app_timer_id_t timer_id)
 Function for stopping the specified timer.
uint32_t app_timer_stop_all (void)
 Function for stopping all running timers.
uint32_t app_timer_cnt_get (uint32_t *p_ticks)
 Function for returning the current value of the RTC1 counter.
uint32_t app_timer_cnt_diff_compute (uint32_t ticks_to, uint32_t ticks_from, uint32_t *p_ticks_diff)
 Function for computing the difference between two RTC1 counter values.

Detailed Description

Definition in file app_timer.h.