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