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 162 of file bitswap.h.

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

References FASTLED_FORCE_INLINE, p, and x.