Handler timer functionalities.
Copyright (c) 2017-2018 Microchip Technology Inc. and its subsidiaries.
Data Structures | |
struct | hw_timer_tag |
Macros | |
#define | MAX_TIMEOUT_MS (65) |
#define | MAX_TIMEOUT_MS (65) |
Typedefs | |
typedef struct hw_timer_tag | hw_timer_t |
Functions | |
static void | _start_timer (Tc *tc, uint32_t channel_id, uint32_t timeout_ms) |
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 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) |
void | TC0_Handler (void) |
void | TC1_Handler (void) |
void | TC2_Handler (void) |
Variables | |
platform_hw_timer_callback_t | bus_timer_callback |
static hw_timer_t | hw_timers [STACK_HW_TIMERS] |
static uint32_t | tc_count_ms |
static uint32_t | timeout_count_ms |
hw_timer_callback_t | timer_callback |
#define MAX_TIMEOUT_MS (65) |
Referenced by hw_timer_start_ms(), platform_start_bus_timer(), TC0_Handler(), TC1_Handler(), and TC2_Handler().
#define MAX_TIMEOUT_MS (65) |
typedef struct hw_timer_tag hw_timer_t |
|
inlinestatic |
References tc_start(), tc_write_rc(), and TIMER_OVF_COUNT_1MSEC.
Referenced by hw_timer_start_ms(), platform_start_bus_timer(), TC0_Handler(), TC1_Handler(), and TC2_Handler().
void hw_timer_init | ( | void | ) |
void hw_timer_register_callback | ( | hw_timer_callback_t | cb_ptr | ) |
References timer_callback.
void hw_timer_start | ( | uint32_t | timer_val_s | ) |
References hw_timer_start_ms().
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 | 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().
Referenced by main().
void TC0_Handler | ( | void | ) |
void TC1_Handler | ( | void | ) |
void TC2_Handler | ( | void | ) |
platform_hw_timer_callback_t bus_timer_callback |
|
static |
Referenced by platform_create_hw_timer().
|
static |
Referenced by hw_timer_start_ms(), and TC0_Handler().
|
static |
Referenced by hw_timer_start_ms(), and TC0_Handler().
hw_timer_callback_t timer_callback |
Referenced by hw_timer_register_callback(), and TC0_Handler().