/* Configure buzz clock. freq = sysclk / (2^(div + 1) * (dat + 1))  */
void ald_cmu_buzz_config(cmu_buzz_div_t div, uint16_t dat, type_func_t status)
/* Configure buzz clock. freq = sysclk / (2^(div + 1) * (dat + 1))  */
void ald_cmu_buzz_config(cmu_buzz_div_t div, uint16_t dat, type_func_t status)
{
	assert_param(IS_CMU_BUZZ_DIV(div));
	assert_param(IS_FUNC_STATE(status));
	SYSCFG_UNLOCK();
	if (status) {
		MODIFY_REG(CMU->BUZZCR, CMU_BUZZCR_DIV_MSK, div << CMU_BUZZCR_DIV_POSS);
		MODIFY_REG(CMU->BUZZCR, CMU_BUZZCR_DAT_MSK, dat << CMU_BUZZCR_DAT_POSS);
		SET_BIT(CMU->BUZZCR, CMU_BUZZCR_EN_MSK);
	}
	else {
		CLEAR_BIT(CMU->BUZZCR, CMU_BUZZCR_EN_MSK);
	}
	SYSCFG_LOCK();
	return;
}