From: Keith Packard Date: Sun, 13 Nov 2011 02:32:49 +0000 (-0800) Subject: altos: Set SPI fill value each time it is used. X-Git-Tag: 1.0.9.4~81 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=2bce71eba9f44b6fcf64e307c8174824c3a0fb57 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 --- 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,