1
0
Fork 0

[Split] Sync Timer feature (#10997)

A timer that is kept in sync between the halves of a split keyboard
This commit is contained in:
XScorpion2 2020-12-01 12:04:42 -06:00 committed by GitHub
parent 9c03a89596
commit a8d0ec0749
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 154 additions and 15 deletions

View file

@ -266,9 +266,9 @@ static bool rgb_matrix_none(effect_params_t *params) {
static void rgb_task_timers(void) {
#if defined(RGB_MATRIX_KEYREACTIVE_ENABLED) || RGB_DISABLE_TIMEOUT > 0
uint32_t deltaTime = timer_elapsed32(rgb_timer_buffer);
uint32_t deltaTime = sync_timer_elapsed32(rgb_timer_buffer);
#endif // defined(RGB_MATRIX_KEYREACTIVE_ENABLED) || RGB_DISABLE_TIMEOUT > 0
rgb_timer_buffer = timer_read32();
rgb_timer_buffer = sync_timer_read32();
// Update double buffer timers
#if RGB_DISABLE_TIMEOUT > 0
@ -296,7 +296,7 @@ static void rgb_task_timers(void) {
static void rgb_task_sync(void) {
// next task
if (timer_elapsed32(g_rgb_timer) >= RGB_MATRIX_LED_FLUSH_LIMIT) rgb_task_state = STARTING;
if (sync_timer_elapsed32(g_rgb_timer) >= RGB_MATRIX_LED_FLUSH_LIMIT) rgb_task_state = STARTING;
}
static void rgb_task_start(void) {