1
0
Fork 0

Migrate rgblight.pin and RGB_DI_PIN to ws2812.pin (#20303)

This commit is contained in:
Ryan 2023-04-06 18:00:54 +10:00 committed by GitHub
parent 71c22a12db
commit 47966dc2a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2600 changed files with 4027 additions and 1909 deletions

View file

@ -53,22 +53,22 @@ void sendByte(uint8_t byte) {
// using something like wait_ns(is_one ? T1L : T0L) here throws off timings
if (is_one) {
// 1
writePinHigh(RGB_DI_PIN);
writePinHigh(WS2812_DI_PIN);
wait_ns(WS2812_T1H);
writePinLow(RGB_DI_PIN);
writePinLow(WS2812_DI_PIN);
wait_ns(WS2812_T1L);
} else {
// 0
writePinHigh(RGB_DI_PIN);
writePinHigh(WS2812_DI_PIN);
wait_ns(WS2812_T0H);
writePinLow(RGB_DI_PIN);
writePinLow(WS2812_DI_PIN);
wait_ns(WS2812_T0L);
}
}
}
void ws2812_init(void) {
palSetLineMode(RGB_DI_PIN, WS2812_OUTPUT_MODE);
palSetLineMode(WS2812_DI_PIN, WS2812_OUTPUT_MODE);
}
// Setleds for standard RGB