diff options
author | Keith Packard <keithp@keithp.com> | 2011-11-12 18:32:49 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-11-12 18:36:11 -0800 |
commit | 2bce71eba9f44b6fcf64e307c8174824c3a0fb57 (patch) | |
tree | b5420d74dc7525323326455a096c6e60b7f9bb2a | |
parent | 0a705b62829d492e3a48c81077907cee61afb860 (diff) |
altos: Set SPI fill value each time it is used.
This ensures that the final MOSI pin value will be high after a
receive is finished.
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | src/cc1111/ao_spi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cc1111/ao_spi.c b/src/cc1111/ao_spi.c index fbe613c7..1fa8e128 100644 --- a/src/cc1111/ao_spi.c +++ b/src/cc1111/ao_spi.c @@ -28,7 +28,7 @@ __xdata uint8_t ao_spi_dma_out_done; uint8_t ao_spi_dma_out_id; uint8_t ao_spi_dma_in_id; -static __xdata uint8_t ao_spi_const = 0xff; +static __xdata uint8_t ao_spi_const; /* Send bytes over SPI. * @@ -89,6 +89,8 @@ ao_spi_recv(void __xdata *block, uint16_t len) __reentrant DMA_CFG1_DESTINC_1 | DMA_CFG1_PRIORITY_NORMAL); + ao_spi_const = 0xff; + ao_dma_set_transfer(ao_spi_dma_out_id, &ao_spi_const, &U0DBUFXADDR, |