asf/sam/drivers/pwm/pwm.c
uint32_t pwm_sync_init(Pwm *p_pwm, pwm_sync_update_mode_t mode,
		uint32_t ul_update_period)
{
	uint32_t sync_mode = p_pwm->PWM_SCM;

	sync_mode &= ~PWM_SCM_UPDM_Msk;
	sync_mode |= mode;

	p_pwm->PWM_SCM = sync_mode;

	p_pwm->PWM_SCUP = PWM_SCUP_UPR(ul_update_period);

	return 0;
}
/**
 * \brief Initialize synchronous channels update mode and period.
 *
 * \param p_pwm Pointer to a PWM instance.
 * \param mode Synchronous channels update mode.
 * \param ul_update_period Time between each update of the synchronous channels.
 *
 * \retval 0 if initialization succeeds, otherwise fails.
 */
\brief Initialize synchronous channels update mode and period.
\param p_pwm Pointer to a PWM instance.
\param mode Synchronous channels update mode.
\param ul_update_period Time between each update of the synchronous channels.

\retval 0 if initialization succeeds, otherwise fails.
\ brief Initialize synchronous channels update mode and period . \ param p_pwm Pointer to a PWM instance . \ param mode Synchronous channels update mode . \ param ul_update_period Time between each update of the synchronous channels . \ retval 0 if initialization succeeds otherwise fails .
uint32_t pwm_sync_init(Pwm *p_pwm, pwm_sync_update_mode_t mode,
		uint32_t ul_update_period)
{
	uint32_t sync_mode = p_pwm->PWM_SCM;
	sync_mode &= ~PWM_SCM_UPDM_Msk;
	sync_mode |= mode;
	p_pwm->PWM_SCM = sync_mode;
	p_pwm->PWM_SCUP = PWM_SCUP_UPR(ul_update_period);
	return 0;
}
uint32_t pwm_sync_init ( Pwm * p_pwm , pwm_sync_update_mode_t mode , uint32_t ul_update_period ) { uint32_t sync_mode = p_pwm -> PWM_SCM ; sync_mode &= ~ PWM_SCM_UPDM_Msk ; sync_mode |= mode ; p_pwm -> PWM_SCM = sync_mode ; p_pwm -> PWM_SCUP = PWM_SCUP_UPR ( ul_update_period ) ; return 0 ; }
\brief Initialize synchronous channels update mode and period.
\ brief Initialize synchronous channels update mode and period .