drivers/leds/ws2812: Fix WS2812 pixel size
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 commit is contained in:
parent
fcff5d43b7
commit
d1326e81bc
@ -55,15 +55,7 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef WS2812_HAS_WHITE
|
#ifndef CONFIG_WS2812_NON_SPI_DRIVER
|
||||||
# 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 */
|
|
||||||
|
|
||||||
/* In order to meet the signaling timing requirements, the waveforms required
|
/* In order to meet the signaling timing requirements, the waveforms required
|
||||||
* to represent a 0/1 symbol are created by specific SPI bytes defined here.
|
* to represent a 0/1 symbol are created by specific SPI bytes defined here.
|
||||||
|
@ -52,6 +52,12 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
/* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define WS2812_RW_PIXEL_SIZE 4
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#define EXTERN extern "C"
|
#define EXTERN extern "C"
|
||||||
extern "C"
|
extern "C"
|
||||||
|
Loading…
Reference in New Issue
Block a user