clean up neopixel write !!

This commit is contained in:
hathach 2019-01-08 00:21:31 +07:00
parent 6752266673
commit 215008f78c
No known key found for this signature in database
GPG Key ID: 2FA891220FBFD581

View File

@ -141,7 +141,7 @@ void common_hal_neopixel_write (const digitalio_digitalinout_obj_t* digitalinout
for ( uint16_t n = 0; n < numBytes; n++ ) {
uint8_t pix = pixels[n];
for ( uint8_t mask = 0x80, i = 0; mask > 0; mask >>= 1, i++ ) {
for ( uint8_t mask = 0x80; mask > 0; mask >>= 1 ) {
pixels_pattern[pos] = (pix & mask) ? MAGIC_T1H : MAGIC_T0H;
pos++;
}