/* Unsigned division operation. 
Run the unsigned division operation and return the results. */
uint32_t divas_uidiv(uint32_t numerator, uint32_t denominator)
/* Unsigned division operation. 
Run the unsigned division operation and return the results. */
uint32_t divas_uidiv(uint32_t numerator, uint32_t denominator)
{
	cpu_irq_enter_critical();
	DIVAS->CTRLA.reg &= ~DIVAS_CTRLA_SIGNED;
	DIVAS->DIVIDEND.reg = numerator;
	DIVAS->DIVISOR.reg = denominator;
	while(DIVAS->STATUS.bit.BUSY){
	}
	uint32_t quotient = DIVAS->RESULT.reg;
	cpu_irq_leave_critical();
	return quotient;
}