AllJoyn/Samples/BACnetAdapter/bacnet-stack-0.8.2/ports/xplained/ASF/common/services/clock/xmega/sysclk.h
static inline uint32_t sysclk_get_per2_hz (void)
  {
    switch (CONFIG_SYSCLK_PSBCDIV)
      {
      case SYSCLK_PSBCDIV_1_1:	/* Fall through */
      case SYSCLK_PSBCDIV_1_2:
	return sysclk_get_per4_hz ();

      case SYSCLK_PSBCDIV_4_1:
	return sysclk_get_per4_hz () / 4;

      case SYSCLK_PSBCDIV_2_2:
	return sysclk_get_per4_hz () / 2;

      default:
	//unhandled_case(CONFIG_SYSCLK_PSBCDIV);
	return 0;
      }
  }
/**
 * \brief Return the current rate in Hz of clk_PER2.
 *
 * This clock can run up to two times faster than the CPU clock.
 *
 * \return Frequency of the clk_PER2 clock, in Hz.
 */
\brief Return the current rate in Hz of clk_PER2.
This clock can run up to two times faster than the CPU clock.

\return Frequency of the clk_PER2 clock, in Hz.
\ brief Return the current rate in Hz of clk_PER2 . This clock can run up to two times faster than the CPU clock . \ return Frequency of the clk_PER2 clock in Hz .
static inline uint32_t sysclk_get_per2_hz (void)
  {
    switch (CONFIG_SYSCLK_PSBCDIV)
      {
      case SYSCLK_PSBCDIV_1_1:	
      case SYSCLK_PSBCDIV_1_2:
	return sysclk_get_per4_hz ();
      case SYSCLK_PSBCDIV_4_1:
	return sysclk_get_per4_hz () / 4;
      case SYSCLK_PSBCDIV_2_2:
	return sysclk_get_per4_hz () / 2;
      default:
	return 0;
      }
  }
static inline uint32_t sysclk_get_per2_hz ( void ) { switch ( CONFIG_SYSCLK_PSBCDIV ) { case SYSCLK_PSBCDIV_1_1 : case SYSCLK_PSBCDIV_1_2 : return sysclk_get_per4_hz ( ) ; case SYSCLK_PSBCDIV_4_1 : return sysclk_get_per4_hz ( ) / 4 ; case SYSCLK_PSBCDIV_2_2 : return sysclk_get_per4_hz ( ) / 2 ; default : return 0 ; } }
\brief Return the current rate in Hz of clk_PER2.
\ brief Return the current rate in Hz of clk_PER2 .
/* Fall through */ //unhandled_case(CONFIG_SYSCLK_PSBCDIV);