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:
authorNick Pisarro <infinityminusnine@gmail.com>2019-10-31 21:40:32 +0300
committerNick Pisarro <npisarro@twitter.com>2020-02-10 08:56:40 +0300
commit63b254ea0eaabc4aa8926acdb6dd6cac32b98e43 (patch)
tree58670dbe927a58d99ea2fcac823510e9489f7602
parent1e3f3c78ac05e4413e591f2a3a9f3421788ad5e6 (diff)
Condition on attiny flag
-rw-r--r--lib8tion/random8.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib8tion/random8.h b/lib8tion/random8.h
index ab9ac27e..d834abd5 100644
--- a/lib8tion/random8.h
+++ b/lib8tion/random8.h
@@ -12,8 +12,11 @@
#define FASTLED_RAND16_2053 ((uint16_t)(2053))
#define FASTLED_RAND16_13849 ((uint16_t)(13849))
-// equivalent to x * 2053
+#if defined(LIB8_ATTINY)
#define APPLY_FASTLED_RAND16_2053(x) (x << 11) + (x << 2) + x
+#else
+#define APPLY_FASTLED_RAND16_2053(x) (x * FASTLED_RAND16_2053)
+#endif
/// random number seed
extern uint16_t rand16seed;// = RAND16_SEED;