sam3x8e: Configure spi transfer in spi_prepare()

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2018-07-11 19:40:51 -04:00
parent d9f960fb0c
commit 733506dfb2
1 changed files with 1 additions and 2 deletions

View File

@ -98,14 +98,13 @@ spi_setup(uint32_t bus, uint8_t mode, uint32_t rate)
void
spi_prepare(struct spi_config config)
{
REGPTR->SPI_CSR[CHANNEL] = config.cfg;
}
void
spi_transfer(struct spi_config config, uint8_t receive_data
, uint8_t len, uint8_t *data)
{
REGPTR->SPI_CSR[CHANNEL] = config.cfg;
Spi* const pSpi = REGPTR;
if (receive_data) {
while (len--) {