AllJoyn/Samples/BACnetAdapter/bacnet-stack-0.8.2/ports/xplained/ASF/xmega/drivers/tc/tc.h
static inline void tc_write_cc (volatile void *tc,
				  enum tc_cc_channel_t channel_index,
				  uint16_t value)
  {
    if (tc_is_tc0 (void *tc))
      {
	switch (channel_index)
	  {
	  case TC_CCA:
	    ((TC0_t *) tc)->CCA = value;
	    break;
	  case TC_CCB:
	    ((TC0_t *) tc)->CCB = value;
	    break;
	  case TC_CCC:
	    ((TC0_t *) tc)->CCC = value;
	    break;
	  case TC_CCD:
	    ((TC0_t *) tc)->CCD = value;
	    break;
	  }
      }
    else if (tc_is_tc1 (void *tc))
      {
	switch (channel_index)
	  {
	  case TC_CCA:
	    ((TC1_t *) tc)->CCA = value;
	    break;
	  case TC_CCB:
	    ((TC1_t *) tc)->CCB = value;
	    break;
	  default:
	    return;
	  }
      }
  }
/**
 * \brief Writes the CC value
 *
 * \param tc Pointer to TC module.
 * \param channel_index CC Channel
 * \param value Counter value
 */
\brief Writes the CC value
\param tc Pointer to TC module.
\param channel_index CC Channel
\param value Counter value
\ brief Writes the CC value \ param tc Pointer to TC module . \ param channel_index CC Channel \ param value Counter value
static inline void tc_write_cc (volatile void *tc,
				  enum tc_cc_channel_t channel_index,
				  uint16_t value)
  {
    if (tc_is_tc0 (void *tc))
      {
	switch (channel_index)
	  {
	  case TC_CCA:
	    ((TC0_t *) tc)->CCA = value;
	    break;
	  case TC_CCB:
	    ((TC0_t *) tc)->CCB = value;
	    break;
	  case TC_CCC:
	    ((TC0_t *) tc)->CCC = value;
	    break;
	  case TC_CCD:
	    ((TC0_t *) tc)->CCD = value;
	    break;
	  }
      }
    else if (tc_is_tc1 (void *tc))
      {
	switch (channel_index)
	  {
	  case TC_CCA:
	    ((TC1_t *) tc)->CCA = value;
	    break;
	  case TC_CCB:
	    ((TC1_t *) tc)->CCB = value;
	    break;
	  default:
	    return;
	  }
      }
  }
static inline void tc_write_cc ( volatile void * tc , enum tc_cc_channel_t channel_index , uint16_t value ) { if ( tc_is_tc0 ( void * tc ) ) { switch ( channel_index ) { case TC_CCA : ( ( TC0_t * ) tc ) -> CCA = value ; break ; case TC_CCB : ( ( TC0_t * ) tc ) -> CCB = value ; break ; case TC_CCC : ( ( TC0_t * ) tc ) -> CCC = value ; break ; case TC_CCD : ( ( TC0_t * ) tc ) -> CCD = value ; break ; } } else if ( tc_is_tc1 ( void * tc ) ) { switch ( channel_index ) { case TC_CCA : ( ( TC1_t * ) tc ) -> CCA = value ; break ; case TC_CCB : ( ( TC1_t * ) tc ) -> CCB = value ; break ; default : return ; } } }
\brief Writes the CC value
 \param tc Pointer to TC module.
\ brief Writes the CC value \ param tc Pointer to TC module .