/* Enable the SERCOM SPI module. 
This function must be called after  */
void spi_master_vec_enable(const struct spi_master_vec_module *const module)
/* Enable the SERCOM SPI module. 
This function must be called after  */
void spi_master_vec_enable(const struct spi_master_vec_module *const module)
{
	Assert(module);
	Assert(module->sercom);
	SercomSpi *const spi_hw = &(module->sercom->SPI);
	spi_hw->INTENCLR.reg = SERCOM_SPI_INTFLAG_DRE | SERCOM_SPI_INTFLAG_RXC
			| SERCOM_SPI_INTFLAG_TXC;
	_spi_master_vec_wait_for_sync(spi_hw);
	spi_hw->CTRLA.reg |= SERCOM_SPI_CTRLA_ENABLE;
	system_interrupt_enable(_sercom_get_interrupt_vector(module->sercom));
}