瀏覽代碼

Fixup WS2812 vendor driver (#19028)

jack 2 年之前
父節點
當前提交
dad5262425
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      platforms/chibios/drivers/vendor/RP/RP2040/ws2812_vendor.c

+ 1 - 1
platforms/chibios/drivers/vendor/RP/RP2040/ws2812_vendor.c

@@ -242,7 +242,7 @@ bool ws2812_init(void) {
 }
 }
 
 
 static inline void sync_ws2812_transfer(void) {
 static inline void sync_ws2812_transfer(void) {
-    if (chSemWaitTimeout(&TRANSFER_COUNTER, TIME_MS2I(RGBLED_NUM)) == MSG_TIMEOUT) {
+    if (chSemWaitTimeout(&TRANSFER_COUNTER, TIME_MS2I(WS2812_LED_COUNT)) == MSG_TIMEOUT) {
         // Abort the synchronization if we have to wait longer than the total
         // Abort the synchronization if we have to wait longer than the total
         // count of LEDs in milliseconds. This is safely much longer than it
         // count of LEDs in milliseconds. This is safely much longer than it
         // would take to push all the data out.
         // would take to push all the data out.