FastLED 3.9.15
Loading...
Searching...
No Matches

◆ selectBasedOnHashBit()

static fl::i8 selectBasedOnHashBit ( fl::u8 hash,
fl::u8 bitnumber,
fl::i8 a,
fl::i8 b )
inlinestatic

Definition at line 173 of file noise.cpp.hpp.

173 {
175#if !defined(FL_IS_AVR)
176 result = (hash & (1<<bitnumber)) ? a : b;
177#else
178 asm volatile(
179 "mov %[result],%[a] \n\t"
180 "sbrs %[hash],%[bitnumber] \n\t"
181 "mov %[result],%[b] \n\t"
182 : [result] "=r" (result)
183 : [hash] "r" (hash),
184 [bitnumber] "M" (bitnumber),
185 [a] "r" (a),
186 [b] "r" (b)
187 );
188#endif
189 return result;
190}
expected< T, E > result
Alias for expected (Rust-style naming)
Definition result.h:31
signed char i8
Definition stdint.h:130