1
0
Fork 0

Tidy up adjustable ws2812 timing (#15299)

This commit is contained in:
Joel Challis 2021-11-25 19:35:06 +00:00 committed by GitHub
parent 3d00620711
commit 5e9c29da0d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 55 additions and 58 deletions

View file

@ -71,7 +71,7 @@
* Calculate the number of zeroes to add at the end assuming 1.25 uS/bit:
*/
#define WS2812_COLOR_BITS (WS2812_CHANNELS * 8)
#define WS2812_RESET_BIT_N (1000 * WS2812_TRST_US / 1250)
#define WS2812_RESET_BIT_N (1000 * WS2812_TRST_US / WS2812_TIMING)
#define WS2812_COLOR_BIT_N (RGBLED_NUM * WS2812_COLOR_BITS) /**< Number of data bits */
#define WS2812_BIT_N (WS2812_COLOR_BIT_N + WS2812_RESET_BIT_N) /**< Total number of bits in a frame */