/* Function for configuring I2C master module. 
This function will configure the I2C master module with the SERCOM module to be used and pinmux settings  */
static void configure_i2c_master(void)
/* Function for configuring I2C master module. 
This function will configure the I2C master module with the SERCOM module to be used and pinmux settings  */
static void configure_i2c_master(void)
{
	pmc_enable_periph_clk(EDBG_I2C_MODULE_ID);
	opt.master_clk = sysclk_get_cpu_hz();
	opt.speed      = TWI_CLK;
	if (twi_master_init(EDBG_I2C_MODULE, &opt) != TWI_SUCCESS) {
		puts("-E-\tTWI master initialization failed.\r");
		while (1) {
		}
	}
}