AllJoyn/Samples/BACnetAdapter/bacnet-stack-0.8.2/ports/xplained/ASF/xmega/drivers/tc/tc.h
static inline void tc_clear_cc_interrupt (volatile void *tc,
					    enum tc_cc_channel_t
					    channel_index)
  {
    if (tc_is_tc0 (void *tc))
      {
	switch (channel_index)
	  {
	  case TC_CCA:
	    ((TC0_t *) tc)->INTFLAGS = TC0_CCAIF_bm;
	    break;
	  case TC_CCB:
	    ((TC0_t *) tc)->INTFLAGS = TC0_CCBIF_bm;
	    break;
	  case TC_CCC:
	    ((TC0_t *) tc)->INTFLAGS = TC0_CCCIF_bm;
	    break;
	  case TC_CCD:
	    ((TC0_t *) tc)->INTFLAGS = TC0_CCDIF_bm;
	    break;
	  }
      }
    else if (tc_is_tc1 (void *tc))
      {
	switch (channel_index)
	  {
	  case TC_CCA:
	    ((TC1_t *) tc)->INTFLAGS = TC1_CCAIF_bm;
	    break;
	  case TC_CCB:
	    ((TC1_t *) tc)->INTFLAGS = TC1_CCBIF_bm;
	    break;
	  default:
	    return;
	  }
      }
  }
/**
 * \brief Clears Capture/Compare interrupt
 *
 * \param tc Pointer to TC module.
 * \param channel_index CC Channel
 */
\brief Clears Capture/Compare interrupt
\param tc Pointer to TC module.
\param channel_index CC Channel
\ brief Clears Capture / Compare interrupt \ param tc Pointer to TC module . \ param channel_index CC Channel
static inline void tc_clear_cc_interrupt (volatile void *tc,
					    enum tc_cc_channel_t
					    channel_index)
  {
    if (tc_is_tc0 (void *tc))
      {
	switch (channel_index)
	  {
	  case TC_CCA:
	    ((TC0_t *) tc)->INTFLAGS = TC0_CCAIF_bm;
	    break;
	  case TC_CCB:
	    ((TC0_t *) tc)->INTFLAGS = TC0_CCBIF_bm;
	    break;
	  case TC_CCC:
	    ((TC0_t *) tc)->INTFLAGS = TC0_CCCIF_bm;
	    break;
	  case TC_CCD:
	    ((TC0_t *) tc)->INTFLAGS = TC0_CCDIF_bm;
	    break;
	  }
      }
    else if (tc_is_tc1 (void *tc))
      {
	switch (channel_index)
	  {
	  case TC_CCA:
	    ((TC1_t *) tc)->INTFLAGS = TC1_CCAIF_bm;
	    break;
	  case TC_CCB:
	    ((TC1_t *) tc)->INTFLAGS = TC1_CCBIF_bm;
	    break;
	  default:
	    return;
	  }
      }
  }
static inline void tc_clear_cc_interrupt ( volatile void * tc , enum tc_cc_channel_t channel_index ) { if ( tc_is_tc0 ( void * tc ) ) { switch ( channel_index ) { case TC_CCA : ( ( TC0_t * ) tc ) -> INTFLAGS = TC0_CCAIF_bm ; break ; case TC_CCB : ( ( TC0_t * ) tc ) -> INTFLAGS = TC0_CCBIF_bm ; break ; case TC_CCC : ( ( TC0_t * ) tc ) -> INTFLAGS = TC0_CCCIF_bm ; break ; case TC_CCD : ( ( TC0_t * ) tc ) -> INTFLAGS = TC0_CCDIF_bm ; break ; } } else if ( tc_is_tc1 ( void * tc ) ) { switch ( channel_index ) { case TC_CCA : ( ( TC1_t * ) tc ) -> INTFLAGS = TC1_CCAIF_bm ; break ; case TC_CCB : ( ( TC1_t * ) tc ) -> INTFLAGS = TC1_CCBIF_bm ; break ; default : return ; } } }
\brief Clears Capture/Compare interrupt
 \param tc Pointer to TC module.
\ brief Clears Capture / Compare interrupt \ param tc Pointer to TC module .