Microchip® Advanced Software Framework

hw_timer.h File Reference

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 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 disable overflow interrupt More...
 
uint8_t tmr_init (void)
 to initialize 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)

to restore saved interrupts status

Parameters
savedinterrupt status

References cpu_irq_restore().

uint8_t save_cpu_interrupt ( void  )

to save current interrupts status

References cpu_irq_save().

void tmr_disable_cc_interrupt ( void  )

to disable compare interrupt

References module_inst, TC_CALLBACK_CC_CHANNEL0, and tc_disable_callback().

void tmr_disable_ovf_interrupt ( void  )

to disable overflow interrupt

References module_inst, TC_CALLBACK_OVERFLOW, and tc_disable_callback().

void tmr_enable_cc_interrupt ( void  )
void tmr_enable_ovf_interrupt ( void  )

to disable overflow interrupt

References module_inst, TC_CALLBACK_OVERFLOW, and tc_enable_callback().

uint16_t tmr_read_count ( void  )

read the actual timer count from register

References module_inst, and tc_get_count_value().

void tmr_stop ( void  )

to stop the running timer

References module_inst, and tc_disable().

void tmr_write_cmpreg ( uint16_t  compare_value)

to load compare value in channel compare register

References module_inst, TC_COMPARE_CAPTURE_CHANNEL_0, and tc_set_compare_value().