diff options
author | Keith Packard <keithp@keithp.com> | 2013-03-26 14:26:38 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-03-26 14:26:38 -0700 |
commit | 4d187460bdcb97bf6d0a3550e4e03c4c223e4cc1 (patch) | |
tree | b42dd33a17015c824f5b62e3be46b7124d1a595c /src/stm/ao_spi_stm.c | |
parent | 136ca0922e968d650e9e420a47d228611a3cb45e (diff) |
altos/stm: Ensure SPI always sends 0xff during receive
SD cards require 0xff when fetching data
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/stm/ao_spi_stm.c')
-rw-r--r-- | src/stm/ao_spi_stm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/stm/ao_spi_stm.c b/src/stm/ao_spi_stm.c index 7b4af964..56329c24 100644 --- a/src/stm/ao_spi_stm.c +++ b/src/stm/ao_spi_stm.c @@ -160,6 +160,8 @@ ao_spi_recv(void *block, uint16_t len, uint8_t spi_index) uint8_t mosi_dma_index = ao_spi_stm_info[AO_SPI_INDEX(spi_index)].mosi_dma_index; uint8_t miso_dma_index = ao_spi_stm_info[AO_SPI_INDEX(spi_index)].miso_dma_index; + spi_dev_null = 0xff; + /* Set up transmit DMA to make the SPI hardware actually run */ ao_dma_set_transfer(mosi_dma_index, &stm_spi->dr, |