Handles timer functionalities.
Copyright (c) 2017-2018 Microchip Technology Inc. and its subsidiaries.
Macros | |
#define | STACK_HW_TIMERS 2 |
Typedefs | |
typedef void(* | hw_timer_callback_t )(void) |
typedef void(* | platform_hw_timer_callback_t )(void *) |
Functions | |
void | hw_timer_init (void) |
void | hw_timer_register_callback (hw_timer_callback_t cb_ptr) |
void | hw_timer_start (uint32_t timer_val_s) |
void | hw_timer_start_ms (uint32_t timer_val_ms) |
void | hw_timer_stop (void) |
void * | platform_create_hw_timer (platform_hw_timer_callback_t bus_tc_cb_ptr) |
void | platform_delete_bus_timer (void *timer_handle) |
void | platform_start_bus_timer (void *timer_handle, uint32_t ms) |
void | platform_stop_bus_timer (void *timer_handle) |
void | platform_stop_stack_timers (void) |
#define STACK_HW_TIMERS 2 |
typedef void(* hw_timer_callback_t)(void) |
typedef void(* platform_hw_timer_callback_t)(void *) |
void hw_timer_init | ( | void | ) |
References BLE_APP_TIMER, BLE_APP_TIMER_CHANNEL_ID, sysclk_enable_peripheral_clock(), tc_enable_interrupt(), tc_get_status(), tc_init(), tc_stop(), and tc_write_rc().
Referenced by main().
void hw_timer_register_callback | ( | hw_timer_callback_t | cb_ptr | ) |
References timer_callback.
Referenced by main().
void hw_timer_start | ( | uint32_t | timer_val_s | ) |
References hw_timer_start_ms().
Referenced by main().
void hw_timer_start_ms | ( | uint32_t | timer_val_ms | ) |
References _start_timer(), BLE_APP_TIMER, BLE_APP_TIMER_CHANNEL_ID, MAX_TIMEOUT_MS, tc_count_ms, and timeout_count_ms.
Referenced by hw_timer_start().
void hw_timer_stop | ( | void | ) |
References BLE_APP_TIMER, BLE_APP_TIMER_CHANNEL_ID, and tc_stop().
void* platform_create_hw_timer | ( | platform_hw_timer_callback_t | bus_tc_cb_ptr | ) |
void platform_delete_bus_timer | ( | void * | timer_handle | ) |
References hw_timer_tag::channel_id, hw_timer_tag::instance, hw_timer_tag::state, tc_stop(), and UNUSED.
Referenced by platform_delete_timer().
void platform_start_bus_timer | ( | void * | timer_handle, |
uint32_t | ms | ||
) |
References _start_timer(), hw_timer_tag::channel_id, hw_timer_tag::instance, MAX_TIMEOUT_MS, and hw_timer_tag::timeout_ms.
Referenced by platform_start_timer().
void platform_stop_bus_timer | ( | void * | timer_handle | ) |
References hw_timer_tag::channel_id, hw_timer_tag::instance, and tc_stop().
Referenced by platform_stop_timer().
void platform_stop_stack_timers | ( | void | ) |
References STACK_TIMER_0, STACK_TIMER_0_CHANNEL_ID, STACK_TIMER_1, STACK_TIMER_1_CHANNEL_ID, and tc_stop().