sam3x8e: Configure spi transfer in spi_prepare()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
d9f960fb0c
commit
733506dfb2
|
@ -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--) {
|
||||
|
|
Loading…
Reference in New Issue