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

◆ slowswap()

FASTLED_FORCE_INLINE void slowswap ( unsigned char * A,
unsigned char * B )

Slow version of the 8 byte by 8 bit rotation.

Definition at line 160 of file bitswap.h.

160 {
161
162 for(int row = 0; row < 7; ++row) {
163 uint8_t x = A[row];
164
165 uint8_t bit = (1<<row);
166 unsigned char *p = B;
167 for(uint32_t mask = 1<<7 ; mask ; mask >>= 1) {
168 if(x & mask) {
169 *p++ |= bit;
170 } else {
171 *p++ &= ~bit;
172 }
173 }
174 // B[7] |= (x & 0x01) << row; x >>= 1;
175 // B[6] |= (x & 0x01) << row; x >>= 1;
176 // B[5] |= (x & 0x01) << row; x >>= 1;
177 // B[4] |= (x & 0x01) << row; x >>= 1;
178 // B[3] |= (x & 0x01) << row; x >>= 1;
179 // B[2] |= (x & 0x01) << row; x >>= 1;
180 // B[1] |= (x & 0x01) << row; x >>= 1;
181 // B[0] |= (x & 0x01) << row; x >>= 1;
182 }
183}
uint32_t x[NUM_LAYERS]
Definition Fire2023.ino:80
static FASTLED_NAMESPACE_BEGIN uint8_t const p[]
Definition noise.cpp:56

References FASTLED_FORCE_INLINE, p, and x.