AllJoyn/Samples/BACnetAdapter/bacnet-stack-0.8.2/ports/xplained/ASF/xmega/services/pwm/pwm.c
void pwm_start(struct pwm_config *config, uint8_t duty_cycle_scale)
{
	/* Set given duty cycle */
	pwm_set_duty_cycle_percent(config, duty_cycle_scale);
	/* Set correct TC period */
	tc_write_period(config->tc, config->period);
	/* Enable CC channel for this TC */
	tc_enable_cc_channels(config->tc, config->cc_mask);
	/* Enable TC by setting correct clock prescaler */
	tc_write_clock_source(config->tc, config->clk_sel);
}
/**
 * \brief Start a PWM channel
 *
 * This function enables a channel with a given duty cycle.
 *
 * \param *config           Pointer to the PWM configuration struct
 * \param duty_cycle_scale  Duty cycle as a value between 0 and 100.
 */
\brief Start a PWM channel
This function enables a channel with a given duty cycle.

\param *config           Pointer to the PWM configuration struct
\param duty_cycle_scale  Duty cycle as a value between 0 and 100.
\ brief Start a PWM channel This function enables a channel with a given duty cycle . \ param * config Pointer to the PWM configuration struct \ param duty_cycle_scale Duty cycle as a value between 0 and 100 .
void pwm_start(struct pwm_config *config, uint8_t duty_cycle_scale)
{
	pwm_set_duty_cycle_percent(config, duty_cycle_scale);
	tc_write_period(config->tc, config->period);
	tc_enable_cc_channels(config->tc, config->cc_mask);
	tc_write_clock_source(config->tc, config->clk_sel);
}
void pwm_start ( struct pwm_config * config , uint8_t duty_cycle_scale ) { pwm_set_duty_cycle_percent ( config , duty_cycle_scale ) ; tc_write_period ( config -> tc , config -> period ) ; tc_enable_cc_channels ( config -> tc , config -> cc_mask ) ; tc_write_clock_source ( config -> tc , config -> clk_sel ) ; }
\brief Start a PWM channel
 This function enables a channel with a given duty cycle.
\ brief Start a PWM channel This function enables a channel with a given duty cycle .
/* Set given duty cycle */ /* Set correct TC period */ /* Enable CC channel for this TC */ /* Enable TC by setting correct clock prescaler */