AllJoyn/Samples/BACnetAdapter/bacnet-stack-0.8.2/ports/xplained/ASF/xmega/drivers/tc/tc.h
static inline uint32_t tc_get_resolution (volatile void *tc)
  {
    uint32_t tc_clk_rate = sysclk_get_per_hz ();
    switch (tc_read_clock_source (tc))
      {
      case TC_CLKSEL_OFF_gc:
	tc_clk_rate = 0;
	break;

      case TC_CLKSEL_DIV1024_gc:
	tc_clk_rate /= 1024;
	break;

      case TC_CLKSEL_DIV256_gc:
	tc_clk_rate /= 256;
	break;

      case TC_CLKSEL_DIV64_gc:
	tc_clk_rate /= 64;
	break;

      case TC_CLKSEL_DIV8_gc:
	tc_clk_rate /= 8;
	break;

      case TC_CLKSEL_DIV4_gc:
	tc_clk_rate /= 4;
	break;

      case TC_CLKSEL_DIV2_gc:
	tc_clk_rate /= 2;
	break;

      case TC_CLKSEL_DIV1_gc:
	break;

      default:
	tc_clk_rate = 0;
	break;
      }
    return (tc_clk_rate);
  }
/**
 * \brief Get real resolution for a specified TC.
 *
 * This function returns the resolution which the specified clock selection
 * of TC will result in. The resolution of a TC is synonymous with its clock
 * frequency.
 *
 * \note This function does not handle event channel clock selections.
 *
 * \param tc Pointer of TC module to get resolution for.
 *
 * \return The resolution of \a tc.
 */
\brief Get real resolution for a specified TC.
This function returns the resolution which the specified clock selection
of TC will result in. The resolution of a TC is synonymous with its clock
frequency.

\note This function does not handle event channel clock selections.

\param tc Pointer of TC module to get resolution for.

\return The resolution of \a tc.
\ brief Get real resolution for a specified TC . This function returns the resolution which the specified clock selection of TC will result in . The resolution of a TC is synonymous with its clock frequency . \ note This function does not handle event channel clock selections . \ param tc Pointer of TC module to get resolution for . \ return The resolution of \ a tc .
static inline uint32_t tc_get_resolution (volatile void *tc)
  {
    uint32_t tc_clk_rate = sysclk_get_per_hz ();
    switch (tc_read_clock_source (tc))
      {
      case TC_CLKSEL_OFF_gc:
	tc_clk_rate = 0;
	break;
      case TC_CLKSEL_DIV1024_gc:
	tc_clk_rate /= 1024;
	break;
      case TC_CLKSEL_DIV256_gc:
	tc_clk_rate /= 256;
	break;
      case TC_CLKSEL_DIV64_gc:
	tc_clk_rate /= 64;
	break;
      case TC_CLKSEL_DIV8_gc:
	tc_clk_rate /= 8;
	break;
      case TC_CLKSEL_DIV4_gc:
	tc_clk_rate /= 4;
	break;
      case TC_CLKSEL_DIV2_gc:
	tc_clk_rate /= 2;
	break;
      case TC_CLKSEL_DIV1_gc:
	break;
      default:
	tc_clk_rate = 0;
	break;
      }
    return (tc_clk_rate);
  }
static inline uint32_t tc_get_resolution ( volatile void * tc ) { uint32_t tc_clk_rate = sysclk_get_per_hz ( ) ; switch ( tc_read_clock_source ( tc ) ) { case TC_CLKSEL_OFF_gc : tc_clk_rate = 0 ; break ; case TC_CLKSEL_DIV1024_gc : tc_clk_rate /= 1024 ; break ; case TC_CLKSEL_DIV256_gc : tc_clk_rate /= 256 ; break ; case TC_CLKSEL_DIV64_gc : tc_clk_rate /= 64 ; break ; case TC_CLKSEL_DIV8_gc : tc_clk_rate /= 8 ; break ; case TC_CLKSEL_DIV4_gc : tc_clk_rate /= 4 ; break ; case TC_CLKSEL_DIV2_gc : tc_clk_rate /= 2 ; break ; case TC_CLKSEL_DIV1_gc : break ; default : tc_clk_rate = 0 ; break ; } return ( tc_clk_rate ) ; }
\brief Get real resolution for a specified TC.
\ brief Get real resolution for a specified TC .