MCPcopy Create free account
hub / github.com/FastLED/FastLED / lsrX4

Function lsrX4

src/fl/gfx/colorutils.cpp.hpp:243–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241/// a SWAP instruction followed by an AND 0x0F, which is faster, and smaller.
242inline fl::u8 lsrX4(fl::u8 dividend) __attribute__((always_inline));
243inline fl::u8 lsrX4(fl::u8 dividend) {
244#if defined(FL_IS_AVR)
245 dividend /= 2;
246 dividend /= 2;
247 dividend /= 2;
248 dividend /= 2;
249#else
250 dividend >>= 4;
251#endif
252 return dividend;
253}
254
255namespace {
256

Callers 1

ColorFromPaletteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected