Commit dc6edbb
committed
ws2812: fix PIO TX FIFO overflow on rp2040/rp2350 dropping LEDs
PutRGB calls TxPut which is non-blocking and silently discards data
when the TX FIFO is full.
Wait for FIFO space before each PutRGB using runtime.Gosched() to
yield cooperatively, matching the pattern used by piolib.WriteRaw.
Signed-off-by: deadprogram <ron@hybridgroup.com>1 parent 1d695a2 commit dc6edbb
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
| |||
0 commit comments