FastLED 3.10.8
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 184 of file noise.cpp.hpp.

184 {
186#if !defined(FL_IS_AVR)
187 result = (hash & (1<<bitnumber)) ? a : b;
188#else
189 asm volatile(
190 "mov %[result],%[a] \n\t"
191 "sbrs %[hash],%[bitnumber] \n\t"
192 "mov %[result],%[b] \n\t"
193 : [result] "=r" (result)
194 : [hash] "r" (hash),
195 [bitnumber] "M" (bitnumber),
196 [a] "r" (a),
197 [b] "r" (b)
198 );
199#endif
200 return result;
201}
expected< T, E > result
Alias for expected (Rust-style naming)
Definition result.h:31
signed char i8
Definition stdint.h:130

References FL_NO_EXCEPT.