From 2bce71eba9f44b6fcf64e307c8174824c3a0fb57 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 12 Nov 2011 18:32:49 -0800 Subject: [PATCH] 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 --- src/cc1111/ao_spi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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, -- 2.30.2