Copyright (c) 2014-2018 Microchip Technology Inc.
and its subsidiaries.
Typedefs | |
typedef void(* | tmr_callback_t )(void) |
Functions | |
void | restore_cpu_interrupt (uint8_t flags) |
to restore saved interrupts status More... | |
uint8_t | save_cpu_interrupt (void) |
to save current interrupts status More... | |
void | tc_cca_callback (void) |
hw timer compare callback More... | |
void | tc_ovf_callback (void) |
hw timer overflow callback More... | |
void | tmr_disable_cc_interrupt (void) |
to disable compare interrupt More... | |
void | tmr_disable_ovf_interrupt (void) |
to disable overflow interrupt More... | |
void | tmr_enable_cc_interrupt (void) |
to enable compare interrupt More... | |
uint8_t | tmr_init (void) |
to initialiaze hw timer More... | |
uint16_t | tmr_read_count (void) |
read the actual timer count from register More... | |
void | tmr_stop (void) |
to stop the running timer More... | |
void | tmr_write_cmpreg (uint16_t compare_value) |
to load compare value in channel compare register More... | |
typedef void(* tmr_callback_t)(void) |
void restore_cpu_interrupt | ( | uint8_t | flags | ) |
uint8_t save_cpu_interrupt | ( | void | ) |
to save current interrupts status
References cpu_irq_save().
void tc_cca_callback | ( | void | ) |
void tc_ovf_callback | ( | void | ) |
void tmr_disable_cc_interrupt | ( | void | ) |
to disable compare interrupt
References TC_CCA, tc_clear_cc_interrupt(), TC_INT_LVL_OFF, tc_set_cca_interrupt_level(), and TIMER.
void tmr_disable_ovf_interrupt | ( | void | ) |
to disable overflow interrupt
References tc_clear_overflow(), TC_INT_LVL_OFF, tc_set_overflow_interrupt_level(), and TIMER.
void tmr_enable_cc_interrupt | ( | void | ) |
to enable compare interrupt
References TC_CCA, tc_clear_cc_interrupt(), TC_INT_LVL_HI, tc_set_cca_interrupt_level(), and TIMER.
uint8_t tmr_init | ( | void | ) |
to initialiaze hw timer
References DEF_1MHZ, sysclk_get_peripheral_bus_hz(), tc_cca_callback(), TC_CCAEN, tc_enable(), tc_enable_cc_channels(), TC_INT_LVL_HI, TC_INT_LVL_OFF, tc_ovf_callback(), tc_set_cca_interrupt_callback(), tc_set_cca_interrupt_level(), tc_set_overflow_interrupt_callback(), tc_set_overflow_interrupt_level(), tc_set_wgm(), TC_WG_NORMAL, tc_write_clock_source(), tc_write_period(), TIMER, and TIMER_PERIOD.
uint16_t tmr_read_count | ( | void | ) |
read the actual timer count from register
References tc_read_count(), and TIMER.
void tmr_stop | ( | void | ) |
to stop the running timer
References tc_disable(), and TIMER.
void tmr_write_cmpreg | ( | uint16_t | compare_value | ) |
to load compare value in channel compare register
References TC_CCA, tc_write_cc(), and TIMER.