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>2015-07-29 22:29:52 +0300
committerDaniel Garcia <danielgarcia@gmail.com>2015-07-29 22:29:52 +0300
commit49bade35da39099e078006184144a07b0d3127af (patch)
tree4b6b46c131a33b9a15990fe5afe7c0447f579a22 /fastspi.h
parentc66c2f333570464e498bfb8a939f9e55a30e37ce (diff)
Fix clock computation for hardware SPI for the teensy 3.x platform
Diffstat (limited to 'fastspi.h')
-rw-r--r--fastspi.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/fastspi.h b/fastspi.h
index 697bc347..500e3e0c 100644
--- a/fastspi.h
+++ b/fastspi.h
@@ -8,9 +8,9 @@
FASTLED_NAMESPACE_BEGIN
-#if (CLK_DBL == 1)
-#define DATA_RATE_MHZ(X) (((F_CPU / 1000000L) / X)/2)
-#define DATA_RATE_KHZ(X) (((F_CPU / 1000L) / X)/2)
+#if defined(FASTLED_TEENSY3) && (F_CPU > 48000000)
+#define DATA_RATE_MHZ(X) (((48000000L / 1000000L) / X))
+#define DATA_RATE_KHZ(X) (((48000000L / 1000L) / X))
#else
#define DATA_RATE_MHZ(X) ((F_CPU / 1000000L) / X)
#define DATA_RATE_KHZ(X) ((F_CPU / 1000L) / X)