/* Reads requested amount of data from the SPI. 
This function will return after reading requested amount of data */
enum status_code spi_read_buffer_wait(struct spi_module *const module, uint8_t *rx_data, uint16_t length, uint8_t dummy)
/* Reads requested amount of data from the SPI. 
This function will return after reading requested amount of data */
enum status_code spi_read_buffer_wait(struct spi_module *const module, uint8_t *rx_data, uint16_t length, uint8_t dummy)
{
	module->tx_dummy_byte = dummy;
	return spi_transceive_buffer_wait(module, NULL, rx_data, length);
}