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