diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2018-07-11 19:40:51 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2018-07-11 19:40:51 -0400 |
commit | 733506dfb248a329794ae3f5f994b5c7c3ec2f7d (patch) | |
tree | a04056e51685c0d0f5cba8e152410618cca04f74 | |
parent | d9f960fb0c242462e9e894104217d58439b515e2 (diff) | |
download | kutter-733506dfb248a329794ae3f5f994b5c7c3ec2f7d.tar.gz kutter-733506dfb248a329794ae3f5f994b5c7c3ec2f7d.tar.xz kutter-733506dfb248a329794ae3f5f994b5c7c3ec2f7d.zip |
sam3x8e: Configure spi transfer in spi_prepare()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r-- | src/sam3x8e/spi.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/sam3x8e/spi.c b/src/sam3x8e/spi.c index c1137318..8ff9e97d 100644 --- a/src/sam3x8e/spi.c +++ b/src/sam3x8e/spi.c @@ -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--) { |