diff options
author | Nick Pisarro <infinityminusnine@gmail.com> | 2019-10-31 21:40:32 +0300 |
---|---|---|
committer | Nick Pisarro <npisarro@twitter.com> | 2020-02-10 08:56:40 +0300 |
commit | 63b254ea0eaabc4aa8926acdb6dd6cac32b98e43 (patch) | |
tree | 58670dbe927a58d99ea2fcac823510e9489f7602 | |
parent | 1e3f3c78ac05e4413e591f2a3a9f3421788ad5e6 (diff) |
Condition on attiny flag
-rw-r--r-- | lib8tion/random8.h | 5 |
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; |