These are chat archives for Makuna/NeoPixelBus

22nd
Aug 2015
Michael Miller
@Makuna
Aug 22 2015 03:30
Can't easily, as the method can't be a member due to the esp flash attrubute. Have it return a bool, and then have calling site use that to reset dirty if it completed.
sticilface
@sticilface
Aug 22 2015 06:01
That is a good idea! Thanks!
sticilface
@sticilface
Aug 22 2015 08:46

so i got that working, and it seems to work. the issue is that this interrupt seems to be present a lot, which makes pixels towards the end of a strip quite jittery... for 120LEDs. If you double the frequency of show() it seems to get round it. not the best method i'll admit and it will fail for progressively longer strips, but you can ping -f now and 1) there are no crashes. 2) even with a crazy number of pings, the lights go a bit jittery... but they do not flash! so they are usable..

I've added this function in esp8266.c

inline uint32_t _getItrrCount()
{
    uint32_t Icount;
    __asm__ __volatile__("esync; rsr %0,226; esync":"=a" (Icount));
    return Icount;
}

added this to the end of the bit send..

             if (_getItrrCount() & 0x1) return true;

and converted the send_pixels from void to bool.. then in the main file i added a check before reseting dirty..

    if (!SendFail) ResetDirty();
thanks @bbx10 for the interrupt mask.
This method will fail for progressively longer strips, though as you won't be able to push through another refresh fast enough, and the no interrupts will always have the wifi interrupt interrupting it.. this method keeps the standard nointurrupts() interrupts() from the original lib.
sticilface
@sticilface
Aug 22 2015 11:36
it also does not work with serial streaming, i.e. ADAlight. I think the serial is setting of the interrupt so it never finishes...