AllJoyn/Samples/BACnetAdapter/bacnet-stack-0.8.2/ports/xplained/ASF/xmega/drivers/tc/tc.h
static inline bool tc_cc_buffer_is_valid (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)->CTRLGCLR & TC0_CCABV_bm;
	  case TC_CCB:
	    return ((TC0_t *) tc)->CTRLGCLR & TC0_CCBBV_bm;
	  case TC_CCC:
	    return ((TC0_t *) tc)->CTRLGCLR & TC0_CCCBV_bm;
	  case TC_CCD:
	    return ((TC0_t *) tc)->CTRLGCLR & TC0_CCDBV_bm;
	  }
      }
    else if (tc_is_tc1 (void *tc))
      {
	switch (channel_index)
	  {
	  case TC_CCA:
	    return (((TC1_t *) tc)->CTRLGCLR & TC1_CCABV_bm);
	  case TC_CCB:
	    return (((TC1_t *) tc)->CTRLGCLR & TC1_CCBBV_bm);
	  default:
	    return (0);
	  }
      }
    return (0);
  }
/**
 * \brief Reports is Capture/Compare Buffer is valid
 *
 * \param tc Pointer to TC module.
 * \param channel_index CC Channel
 * \return  CCx Buffer is valid or not
 */
\brief Reports is Capture/Compare Buffer is valid
\param tc Pointer to TC module.
\param channel_index CC Channel
\return  CCx Buffer is valid or not
\ brief Reports is Capture / Compare Buffer is valid \ param tc Pointer to TC module . \ param channel_index CC Channel \ return CCx Buffer is valid or not
static inline bool tc_cc_buffer_is_valid (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)->CTRLGCLR & TC0_CCABV_bm;
	  case TC_CCB:
	    return ((TC0_t *) tc)->CTRLGCLR & TC0_CCBBV_bm;
	  case TC_CCC:
	    return ((TC0_t *) tc)->CTRLGCLR & TC0_CCCBV_bm;
	  case TC_CCD:
	    return ((TC0_t *) tc)->CTRLGCLR & TC0_CCDBV_bm;
	  }
      }
    else if (tc_is_tc1 (void *tc))
      {
	switch (channel_index)
	  {
	  case TC_CCA:
	    return (((TC1_t *) tc)->CTRLGCLR & TC1_CCABV_bm);
	  case TC_CCB:
	    return (((TC1_t *) tc)->CTRLGCLR & TC1_CCBBV_bm);
	  default:
	    return (0);
	  }
      }
    return (0);
  }
static inline bool tc_cc_buffer_is_valid ( 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 ) -> CTRLGCLR & TC0_CCABV_bm ; case TC_CCB : return ( ( TC0_t * ) tc ) -> CTRLGCLR & TC0_CCBBV_bm ; case TC_CCC : return ( ( TC0_t * ) tc ) -> CTRLGCLR & TC0_CCCBV_bm ; case TC_CCD : return ( ( TC0_t * ) tc ) -> CTRLGCLR & TC0_CCDBV_bm ; } } else if ( tc_is_tc1 ( void * tc ) ) { switch ( channel_index ) { case TC_CCA : return ( ( ( TC1_t * ) tc ) -> CTRLGCLR & TC1_CCABV_bm ) ; case TC_CCB : return ( ( ( TC1_t * ) tc ) -> CTRLGCLR & TC1_CCBBV_bm ) ; default : return ( 0 ) ; } } return ( 0 ) ; }
\brief Reports is Capture/Compare Buffer is valid
 \param tc Pointer to TC module.
\ brief Reports is Capture / Compare Buffer is valid \ param tc Pointer to TC module .