Copyright (c) 2014-2018 Microchip Technology Inc.
and its subsidiaries.
#include <stdint.h>
Typedefs | |
typedef void(* | tmr_callback_t )(void) |
Functions | |
void | restore_cpu_interrupt (uint8_t flags) |
to restore saved interrupt status More... | |
uint8_t | save_cpu_interrupt (void) |
to save current interrupt status 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... | |
void | tmr_enable_ovf_interrupt (void) |
to enable overflow 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 interrupt status
References cpu_irq_save().
void tmr_disable_cc_interrupt | ( | void | ) |
to disable compare interrupt
References tc_interrupt_t::cpcs, tc_configure_interrupts(), TIMER, and TIMER_CHANNEL_ID.
Referenced by tmr_init().
void tmr_disable_ovf_interrupt | ( | void | ) |
to disable overflow interrupt
References tc_interrupt_t::covfs, tc_configure_interrupts(), TIMER, and TIMER_CHANNEL_ID.
void tmr_enable_cc_interrupt | ( | void | ) |
to enable compare interrupt
References tc_interrupt_t::cpcs, tc_configure_interrupts(), tc_read_sr(), TIMER, and TIMER_CHANNEL_ID.
void tmr_enable_ovf_interrupt | ( | void | ) |
to enable overflow interrupt
References tc_interrupt_t::covfs, tc_configure_interrupts(), tc_read_sr(), TIMER, and TIMER_CHANNEL_ID.
Referenced by tmr_init().
uint8_t tmr_init | ( | void | ) |
to initialiaze hw timer
References tc_waveform_opt_t::channel, configure_irq_handler(), DEF_1MHZ, sysclk_enable_peripheral_clock(), sysclk_get_peripheral_bus_hz(), TC_BURST_NOT_GATED, TC_CLOCK_RISING_EDGE, TC_CLOCK_SOURCE_TC2, TC_EVT_EFFECT_NOOP, TC_EXT_EVENT_SEL_TIOB_INPUT, tc_init_waveform(), TC_SEL_NO_EDGE, tc_start(), TC_WAVEFORM_SEL_UP_MODE, TIMER, TIMER_CHANNEL_ID, timer_multiplier, tmr_disable_cc_interrupt(), and tmr_enable_ovf_interrupt().
uint16_t tmr_read_count | ( | void | ) |
read the actual timer count from register
References tc_read_tc(), TIMER, and TIMER_CHANNEL_ID.
void tmr_stop | ( | void | ) |
to stop the running timer
References tc_stop(), TIMER, and TIMER_CHANNEL_ID.
void tmr_write_cmpreg | ( | uint16_t | compare_value | ) |
to load compare value in channel compare register
References tc_write_rc(), TIMER, and TIMER_CHANNEL_ID.