Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Timer Counter (TC) interrupt management

This group provides functions to configure TC module interrupts.

Functions

void tc_set_cca_interrupt_callback (volatile void *tc, tc_callback_t callback)
 Set TC Capture Compare Channel A interrupt callback function. More...
 
static void tc_set_cca_interrupt_level (volatile void *tc, enum TC_INT_LEVEL_t level)
 Configures TC Capture Compare A Interrupt level. More...
 
void tc_set_ccb_interrupt_callback (volatile void *tc, tc_callback_t callback)
 Set TC Capture Compare Channel B interrupt callback function. More...
 
static void tc_set_ccb_interrupt_level (volatile void *tc, enum TC_INT_LEVEL_t level)
 Configures TC Capture Compare B Interrupt level. More...
 
void tc_set_ccc_interrupt_callback (volatile void *tc, tc_callback_t callback)
 Set TC Capture Compare Channel C interrupt callback function. More...
 
static void tc_set_ccc_interrupt_level (volatile void *tc, enum TC_INT_LEVEL_t level)
 Configures TC Capture Compare C Interrupt level. More...
 
void tc_set_ccd_interrupt_callback (volatile void *tc, tc_callback_t callback)
 Set TC Capture Compare Channel D interrupt callback function. More...
 
static void tc_set_ccd_interrupt_level (volatile void *tc, enum TC_INT_LEVEL_t level)
 Configures TC Capture Compare D Interrupt level. More...
 
void tc_set_error_interrupt_callback (volatile void *tc, tc_callback_t callback)
 Set TC error interrupt callback function. More...
 
static void tc_set_error_interrupt_level (volatile void *tc, enum TC_INT_LEVEL_t level)
 Configures TC error Interrupt level. More...
 
void tc_set_overflow_interrupt_callback (volatile void *tc, tc_callback_t callback)
 Set TC overflow interrupt callback function. More...
 
static void tc_set_overflow_interrupt_level (volatile void *tc, enum TC_INT_LEVEL_t level)
 Configures TC overflow Interrupt level. More...
 

void tc_set_cca_interrupt_callback ( volatile void *  tc,
tc_callback_t  callback 
)

Set TC Capture Compare Channel A interrupt callback function.

This function allows the caller to set and change the interrupt callback function. Without setting a callback function the interrupt handler in the driver will only clear the interrupt flags.

Note
Once a callback function is set, the interrupt priority must be set via tc_set_cca_interrupt_level() for interrupts to be generated each time the timer channel A compare matches the current timer count.
Parameters
tcPointer to the Timer Counter (TC) base address
callbackReference to a callback function

References tc_tcc0_cca_callback, tc_tcc1_cca_callback, tc_tcd0_cca_callback, tc_tcd1_cca_callback, tc_tce0_cca_callback, tc_tce1_cca_callback, tc_tcf0_cca_callback, and tc_tcf1_cca_callback.

static void tc_set_cca_interrupt_level ( volatile void *  tc,
enum TC_INT_LEVEL_t  level 
)
inlinestatic

Configures TC Capture Compare A Interrupt level.

Parameters
tcPointer to TC module.
levelCCA interrupt level
Note
Configures CCAINTLVL in INTCTRLB
void tc_set_ccb_interrupt_callback ( volatile void *  tc,
tc_callback_t  callback 
)

Set TC Capture Compare Channel B interrupt callback function.

This function allows the caller to set and change the interrupt callback function. Without setting a callback function the interrupt handler in the driver will only clear the interrupt flags.

Note
Once a callback function is set, the interrupt priority must be set via tc_set_ccb_interrupt_level() for interrupts to be generated each time the timer channel B compare matches the current timer count.
Parameters
tcPointer to the Timer Counter (TC) base address
callbackReference to a callback function

References tc_tcc0_ccb_callback, tc_tcc1_ccb_callback, tc_tcd0_ccb_callback, tc_tcd1_ccb_callback, tc_tce0_ccb_callback, tc_tce1_ccb_callback, tc_tcf0_ccb_callback, and tc_tcf1_ccb_callback.

static void tc_set_ccb_interrupt_level ( volatile void *  tc,
enum TC_INT_LEVEL_t  level 
)
inlinestatic

Configures TC Capture Compare B Interrupt level.

Parameters
tcPointer to TC module.
levelCCB interrupt level
Note
Configures CCBINTLVL in INTCTRLB
void tc_set_ccc_interrupt_callback ( volatile void *  tc,
tc_callback_t  callback 
)

Set TC Capture Compare Channel C interrupt callback function.

This function allows the caller to set and change the interrupt callback function. Without setting a callback function the interrupt handler in the driver will only clear the interrupt flags.

Note
Once a callback function is set, the interrupt priority must be set via tc_set_ccc_interrupt_level() for interrupts to be generated each time the timer channel C compare matches the current timer count.
Parameters
tcPointer to the Timer Counter (TC) base address
callbackReference to a callback function

References tc_tcc0_ccc_callback, tc_tcd0_ccc_callback, tc_tce0_ccc_callback, and tc_tcf0_ccc_callback.

static void tc_set_ccc_interrupt_level ( volatile void *  tc,
enum TC_INT_LEVEL_t  level 
)
inlinestatic

Configures TC Capture Compare C Interrupt level.

Parameters
tcPointer to TC module.
levelCCC interrupt level
Note
Configures CCCINTLVL in INTCTRLB
void tc_set_ccd_interrupt_callback ( volatile void *  tc,
tc_callback_t  callback 
)

Set TC Capture Compare Channel D interrupt callback function.

This function allows the caller to set and change the interrupt callback function. Without setting a callback function the interrupt handler in the driver will only clear the interrupt flags.

Note
Once a callback function is set, the interrupt priority must be set via tc_set_ccd_interrupt_level() for interrupts to be generated each time the timer channel D compare matches the current timer count.
Parameters
tcPointer to the Timer Counter (TC) base address
callbackReference to a callback function

References tc_tcc0_ccd_callback, tc_tcd0_ccd_callback, tc_tce0_ccd_callback, and tc_tcf0_ccd_callback.

static void tc_set_ccd_interrupt_level ( volatile void *  tc,
enum TC_INT_LEVEL_t  level 
)
inlinestatic

Configures TC Capture Compare D Interrupt level.

Parameters
tcPointer to TC module.
levelCCD interrupt level
Note
Configures CCDINTLVL in INTCTRLB
void tc_set_error_interrupt_callback ( volatile void *  tc,
tc_callback_t  callback 
)

Set TC error interrupt callback function.

This function allows the caller to set and change the interrupt callback function. Without setting a callback function the interrupt handler in the driver will only clear the interrupt flags.

Note
Once a callback function is set, the interrupt priority must be set via tc_set_error_interrupt_level() for interrupts to be generated each time a timer error occurs.
Parameters
tcPointer to the Timer Counter (TC) base address
callbackReference to a callback function

References tc_tcc0_err_callback, tc_tcc1_err_callback, tc_tcd0_err_callback, tc_tcd1_err_callback, tc_tce0_err_callback, tc_tce1_err_callback, tc_tcf0_err_callback, and tc_tcf1_err_callback.

static void tc_set_error_interrupt_level ( volatile void *  tc,
enum TC_INT_LEVEL_t  level 
)
inlinestatic

Configures TC error Interrupt level.

Parameters
tcPointer to TC module.
levelError interrupt level
Note
Configures ERRINTLVL in INTCTRLA
void tc_set_overflow_interrupt_callback ( volatile void *  tc,
tc_callback_t  callback 
)

Set TC overflow interrupt callback function.

This function allows the caller to set and change the interrupt callback function. Without setting a callback function the interrupt handler in the driver will only clear the interrupt flags.

Note
Once a callback function is set, the interrupt priority must be set via tc_set_overflow_interrupt_level() for interrupts to be generated each time the timer overflows.
Parameters
tcPointer to the Timer Counter (TC) base address
callbackReference to a callback function

References tc_tcc0_ovf_callback, tc_tcc1_ovf_callback, tc_tcd0_ovf_callback, tc_tcd1_ovf_callback, tc_tce0_ovf_callback, tc_tce1_ovf_callback, tc_tcf0_ovf_callback, and tc_tcf1_ovf_callback.

Referenced by main().

static void tc_set_overflow_interrupt_level ( volatile void *  tc,
enum TC_INT_LEVEL_t  level 
)
inlinestatic

Configures TC overflow Interrupt level.

Parameters
tcPointer to TC module.
levelOverflow interrupt level
Note
Configures OVFINTLVL in INTCTRLA

Referenced by main().