/* Function for fetching data to be programmed. 
This function will read a number of bytes from master for programming the device. */
static void fetch_data(uint8_t *buffer, uint16_t len)
/* Function for fetching data to be programmed. 
This function will read a number of bytes from master for programming the device. */
static void fetch_data(uint8_t *buffer, uint16_t len)
{
	packet.data_length = len;
	packet.data = buffer;
	while (i2c_slave_read_packet_wait(&slave, &packet) != STATUS_OK);
}