From 641ed2a092df959f478390c52f90837b30a5332c Mon Sep 17 00:00:00 2001 From: jaseg Date: Fri, 27 Apr 2018 13:58:42 +0200 Subject: Make channel count configurable --- firmware/main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'firmware/main.c') diff --git a/firmware/main.c b/firmware/main.c index ec56767..c6a4ac9 100644 --- a/firmware/main.c +++ b/firmware/main.c @@ -253,7 +253,7 @@ void do_transpose(void) { for (uint32_t i=0; iDR = (val&0xffff); - while (SPI1->SR & SPI_SR_BSY); +#if NCHANNELS > 16 SPI1->DR = (val>>16); while (SPI1->SR & SPI_SR_BSY); +#endif + SPI1->DR = (val&0xffff); + while (SPI1->SR & SPI_SR_BSY); /* Increment the bit index for the next cycle */ idx++; -- cgit