Merge pull request #91 from bbkiwi/masterfix

Fix ws2812_i2s.c to include ccconfig.h and explicitly invert literals…
This commit is contained in:
CNLohr 2019-09-08 01:00:36 -04:00 committed by GitHub
commit dfd7faf8b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -34,7 +34,7 @@ Extra copyright info:
*******************************************************************************/
#include <ccconfig.h>
#include "slc_register.h"
#include "esp82xxutil.h"
#include <c_types.h>
@ -455,10 +455,10 @@ static const uint16_t bitpatterns[16] = {
#elif defined(WS2812_FOUR_SAMPLE)
#ifdef INVERT
static const uint16_t bitpatterns[16] = {
~0b1000100010001000, ~0b1000100010001100, ~0b1000100011001000, ~0b1000100011001100,
~0b1000110010001000, ~0b1000110010001100, ~0b1000110011001000, ~0b1000110011001100,
~0b1100100010001000, ~0b1100100010001100, ~0b1100100011001000, ~0b1100100011001100,
~0b1100110010001000, ~0b1100110010001100, ~0b1100111011001000, ~0b1100110011001100,
0b0111011101110111, 0b0111011101110011, 0b0111011100110111, 0b0111011100110011,
0b0111001101110111, 0b0111001101110011, 0b0111001100110111, 0b0111001100110011,
0b0011011101110111, 0b0011011101110011, 0b0011011100110111, 0b0011011100110011,
0b0011001101110111, 0b0011001101110011, 0b0011000100110111, 0b0011001100110011,
};
#else
//Tricky, send out WS2812 bits with coded pulses, one nibble, then the other.