Microchip® Advanced Software Framework

EPD_hw_timer.c File Reference
#include <compiler.h>
#include <parts.h>
#include "sysclk.h"
#include "tc_megarf.h"
#include "EPD_hw_timer.h"
#include "conf_EPD_hw_timer.h"

Functions

void tc_disable_compare_int (volatile void *p_tc, enum tc_cc_channel_t channel_index)
 Disable Compare Interrupt in channel C. More...
 
void tc_disable_overflow_int (volatile void *p_tc, enum tc_cc_channel_t channel_index)
 Disable Overflow Interrupt. More...
 
void tc_initc (volatile void *p_tc, TC_CC_CHANNEL_t channel_index, struct tc_control_reg *p_control_reg)
 Configure TC for timer, waveform generation or capture. More...
 
void tc_start (volatile void *p_tc, struct tc_control_reg *p_control_reg)
 to start the running timer More...
 
void tc_stop (volatile void *p_tc)
 to stop the running timer More...
 

void tc_disable_compare_int ( volatile void *  p_tc,
enum tc_cc_channel_t  channel_index 
)

Disable Compare Interrupt in channel C.

Parameters
tcTimer Address

References clear_compa_flag(), clear_compb_flag(), clear_compc_flag(), TC_COMPA, TC_COMPB, TC_COMPC, tc_disable_compa_int(), tc_disable_compb_int(), and tc_disable_compc_int().

Referenced by tc_initc(), and tc_stop().

void tc_disable_overflow_int ( volatile void *  p_tc,
enum tc_cc_channel_t  channel_index 
)

Disable Overflow Interrupt.

Parameters
tcTimer Address

References clear_ovf_flag(), TC_COMPA, TC_COMPB, TC_COMPC, and tc_disable_ovf_int().

Referenced by tc_initc().

void tc_initc ( volatile void *  p_tc,
TC_CC_CHANNEL_t  channel_index,
struct tc_control_reg p_control_reg 
)

Configure TC for timer, waveform generation or capture.

Parameters
p_tcPointer to a TC instance.
ul_channelChannel to configure.
ul_modeControl mode register value to set.

References tc_control_reg::co_mode, tc_disable_compare_int(), tc_disable_overflow_int(), tc_set_co_mode(), tc_set_wg_mode(), and tc_control_reg::wg_mode.

Referenced by initialize_EPD_timer(), and PWM_start_toggle().

void tc_start ( volatile void *  p_tc,
struct tc_control_reg p_control_reg 
)

to start the running timer

References tc_control_reg::cs_select, and tc_set_clk_source().

Referenced by initialize_EPD_timer(), and PWM_start_toggle().

void tc_stop ( volatile void *  p_tc)