Steve if you can give me suggestions of what should be in the read me. People seem to be focused on the code that has nothing to do with the code that drives the LEDsstevestrong wrote: Sun Apr 26, 2020 9:06 am I think we have to thank to @flyboy74 because he shared his code.
On the other hand, a short description of the environment limitations (which core, with or w/o HAL) under the code works to be included in the readme would be helpful for the reader.
The 3 functions of code to note are
void Neopixel_setup(void) setups the timer by writing the needed values to the timer register using the macros in stm32f4xx.h (doesn't use HAL but rather just the pointers in the header file) and also calculates the register values needed (auto reload and capture/compare) for the timer to create the exact timings based upon the #defined T0H, T1H, T0L and T1L
void show_neopixels() will write the data stored in uint8_t LED_data[180] to the LED strip
void TIM4_IRQHandler(void) the interupt handler that does the controlling of the timer to create the needed pulse train.
The code is designed not to be a plug and play finished driver but a working proof of the concept that neopixel can be driven by timers to produce very exact timing with MCUs as fast as a STM32F4 (not sure if slower MCU will be fast enough)
Though all my googling of drivers for Neopixels it seems they are a pain in the butt to drive and most drivers are not pretty in there implementation and are also hard to reconfigure to different timings for different clones that require different timings.
As far as I am aware I am the first to use this method of using timers to drive neo pixels and it is very simple and also flexable to change the timings for different clones. I was expecting with how simple the code was and the comments that most people would be able to look at the code and work it out.