Copyright (c) 2014-2018 Microchip Technology Inc.
and its subsidiaries.
#include <compiler.h>
#include <parts.h>
#include "tc.h"
#include "hw_timer.h"
#include "common_hw_timer.h"
#include "conf_hw_timer.h"
#include "sysclk.h"
Functions | |
static void | configure_NVIC (Tc *cmn_hw_timer, uint8_t cmn_hw_timer_ch) |
to enable the corresponding IRQ in NVIC and set the tme callback More... | |
void | restore_cpu_interrupt (uint8_t flags) |
to restore saved interrupts status More... | |
uint8_t | save_cpu_interrupt (void) |
to save current interrupt status More... | |
void | sysclk_enable_peripheral_clock (uint32_t ul_id) |
void | TC0_Handler (void) |
Interrupt handler for TC00. More... | |
void | TC1_Handler (void) |
Interrupt handler for TC01. More... | |
void | TC2_Handler (void) |
Interrupt handler for TC02. More... | |
void | TC3_Handler (void) |
Interrupt handlers for TC10. More... | |
void | TC4_Handler (void) |
Interrupt handler for TC11. More... | |
void | TC5_Handler (void) |
Interrupt handler for TC12. More... | |
static void | tc_callback (void) |
callback for tmr interrupt 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... | |
Variables | |
uint8_t | timer_multiplier |
tmr_callback_t | tmr_callback |
|
static |
to enable the corresponding IRQ in NVIC and set the tme callback
References tc_callback(), and tmr_callback.
Referenced by tmr_init().
void restore_cpu_interrupt | ( | uint8_t | flags | ) |
uint8_t save_cpu_interrupt | ( | void | ) |
to save current interrupt status
References cpu_irq_save().
void sysclk_enable_peripheral_clock | ( | uint32_t | ul_id | ) |
Referenced by abdac_disable(), abdac_enable(), abdac_init(), ac_init(), adc_enable(), adc_init(), aes_enable(), aes_init(), arch_ioport_init(), ast_enable(), bootloader_system_init(), configure_console(), configure_tc(), configure_usart(), eic5_callback(), eic_callback(), eic_enable(), event_button_init(), event_qtouch_init(), events_enable(), events_init(), example_qtouch_init(), flashcalw_picocache_enable(), freqm_enable(), freqm_init(), generate_crc(), gloc_enable(), hmatrix_enable(), hmatrix_init(), iis_init(), init_dacc(), lcdca_clk_init(), main(), parc_init(), pdca_enable(), picouart_enable(), picouart_set_config(), spi_enable_clock(), start_dac(), sysclk_init(), tc_waveform_initialize(), tmr_init(), twim_set_config(), twis_init(), ui_bm_init(), ui_bm_send_mcu_status(), usart_serial_init(), usart_spi_init(), wdt_enable(), and wdt_init().
void TC0_Handler | ( | void | ) |
Interrupt handler for TC00.
References tmr_callback.
void TC1_Handler | ( | void | ) |
Interrupt handler for TC01.
References tmr_callback.
void TC2_Handler | ( | void | ) |
Interrupt handler for TC02.
References tmr_callback.
void TC3_Handler | ( | void | ) |
Interrupt handlers for TC10.
References tmr_callback.
void TC4_Handler | ( | void | ) |
Interrupt handler for TC11.
References tmr_callback.
void TC5_Handler | ( | void | ) |
Interrupt handler for TC12.
References tmr_callback.
|
static |
callback for tmr interrupt
References tc_get_interrupt_mask(), tc_get_status(), tmr_cca_callback(), and tmr_ovf_callback().
Referenced by configure_NVIC().
void tmr_disable_cc_interrupt | ( | void | ) |
to disable compare interrupt
References tc_disable_interrupt(), and tc_get_status().
Referenced by tmr_init().
void tmr_disable_ovf_interrupt | ( | void | ) |
to disable overflow interrupt
to enable overflow interrupt
References tc_disable_interrupt(), and tc_get_status().
void tmr_enable_cc_interrupt | ( | void | ) |
to enable compare interrupt
References tc_enable_interrupt(), and tc_get_status().
uint8_t tmr_init | ( | void | ) |
to initialiaze hw timer
References configure_NVIC(), DEF_1MHZ, sysclk_enable_peripheral_clock(), sysclk_get_peripheral_bus_hz(), tc_enable_interrupt(), tc_get_status(), tc_init(), tc_start(), tc_write_rc(), and tmr_disable_cc_interrupt().
uint16_t tmr_read_count | ( | void | ) |
read the actual timer count from register
References tc_read_cv().
void tmr_stop | ( | void | ) |
to stop the running timer
References tc_stop().
void tmr_write_cmpreg | ( | uint16_t | compare_value | ) |
to load compare value in channel compare register
References tc_write_ra(), and tc_write_rc().
uint8_t timer_multiplier |
tmr_callback_t tmr_callback |
Referenced by configure_NVIC(), TC0_Handler(), TC1_Handler(), TC2_Handler(), TC3_Handler(), TC4_Handler(), and TC5_Handler().