/* Function for configuring I2C slave module. 
This function will configure the I2C slave module with the SERCOM module to be used, required slave address, address mode mask and pinmux settings  */
static void configure_i2c(void)
/* Function for configuring I2C slave module. 
This function will configure the I2C slave module with the SERCOM module to be used, required slave address, address mode mask and pinmux settings  */
static void configure_i2c(void)
{
	struct i2c_slave_config config_i2c;
	i2c_slave_get_config_defaults(&config_i2c);
	config_i2c.address      = SLAVE_ADDRESS;
	config_i2c.address_mode = I2C_SLAVE_ADDRESS_MODE_MASK;
	config_i2c.pinmux_pad0  = BOOT_I2C_PAD0;
	config_i2c.pinmux_pad1  = BOOT_I2C_PAD1;
	i2c_slave_init(&slave, BOOT_SERCOM, &config_i2c);
	i2c_slave_enable(&slave);
}