tmedicci commented on code in PR #11428: URL: https://github.com/apache/nuttx/pull/11428#discussion_r1435073212
########## drivers/leds/ws2812.c: ########## @@ -55,15 +55,7 @@ * Pre-processor Definitions ****************************************************************************/ -#ifdef WS2812_HAS_WHITE -# define WS2812_RW_PIXEL_SIZE 4 -#else -# define WS2812_RW_PIXEL_SIZE 3 -#endif - -#ifdef CONFIG_WS2812_NON_SPI_DRIVER - -#else /* CONFIG_WS2812_NON_SPI_DRIVER */ Review Comment: Hi @acassis ! Yes, I know (in fact, the "real" ws2812 doesn't contain 4 LEDs at all, only variants that use the same protocol and sometimes are sold as ws2812 RGBW), but the variable that the LED driver uses is 4-byte long (independent of the LED). The lower-half driver should handle that. I explained in the commit message: > Although the LED might be RGB-only, the LED data is packed in a 32-bit long variable and, then, this is the default size of a LED pixel to define the 'WS2812_RW_PIXEL_SIZE' macro. Please note that the lower-half driver will deal with the case of the addressable LED being 3 or 4-pixel sized. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
