What board are you running Espruino on? The Neopixel libs are all different.
I think you might be able to make it work on STM32 using the old school SPI.send4bit method with different bit patterns, and on NRF52 you may be able to use NRF52LL to create an inverter using PPI - but all the others would require a source code change and rebuild.
No guarantees though - SPI may change its state when idling which would break it.
It's been on my list to try and bring all the Neopixel code into one common codebase, and then to add exactly what you're suggesting - an option to toggle the polarity. Haven't had time yet though!
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
What board are you running Espruino on? The Neopixel libs are all different.
I think you might be able to make it work on STM32 using the old school
SPI.send4bit
method with different bit patterns, and on NRF52 you may be able to use NRF52LL to create an inverter using PPI - but all the others would require a source code change and rebuild.No guarantees though - SPI may change its state when idling which would break it.
It's been on my list to try and bring all the Neopixel code into one common codebase, and then to add exactly what you're suggesting - an option to toggle the polarity. Haven't had time yet though!