Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FastLED/FastLED.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Garcia <danielgarcia@gmail.com>2014-10-11 04:23:53 +0400
committerDaniel Garcia <danielgarcia@gmail.com>2014-10-11 04:23:53 +0400
commitbaf6dfaf9eb1ea4e57956398f42555d0d0e3d828 (patch)
tree51ff0c4da8872ac5b9c4e414f7d7cb93cea4024a
parent3cf1699835f982f0aeb728c18bc2119acd52de7b (diff)
Tweak bit-bang'd SPI timing for running high speed chipsets
-rw-r--r--fastspi_bitbang.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/fastspi_bitbang.h b/fastspi_bitbang.h
index a779ddd3..b596f628 100644
--- a/fastspi_bitbang.h
+++ b/fastspi_bitbang.h
@@ -105,8 +105,8 @@ private:
}
public:
- #define SPI_DELAY delaycycles< ((SPI_SPEED-2) / 2)>();
- #define SPI_DELAY_HALF delaycycles< ((SPI_SPEED-4) / 4)>();
+ #define SPI_DELAY delaycycles<1+((SPI_SPEED-2) / 2)>();
+ #define SPI_DELAY_HALF delaycycles<1+ ((SPI_SPEED-4) / 4)>();
// write the BIT'th bit out via spi, setting the data pin then strobing the clcok
template <uint8_t BIT> __attribute__((always_inline, hot)) inline static void writeBit(uint8_t b) {