/* Function for fetching data to be programmed. 
This function will read len 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 len number of bytes from master for programming the device. */
static void fetch_data(uint8_t *buffer, uint16_t len)
{
	while (spi_read_buffer_wait(&slave, buffer, len, dummy) != STATUS_OK);
}