/* for split keyboard slave side */ void rgblight_update_sync(rgblight_syncinfo_t *syncinfo, bool write_to_eeprom) { if (syncinfo->status.change_flags & RGBLIGHT_STATUS_CHANGE_MODE) { if (syncinfo->config.enable) { rgblight_config.enable = 1; // == rgblight_enable_noeeprom(); rgblight_mode_eeprom_helper(syncinfo->config.mode, write_to_eeprom); } else { rgblight_disable_noeeprom(); } } if (syncinfo->status.change_flags & RGBLIGHT_STATUS_CHANGE_HSVS) { rgblight_sethsv_eeprom_helper(syncinfo->config.hue, syncinfo->config.sat, syncinfo->config.val, write_to_eeprom); // rgblight_config.speed = config->speed; // NEED??? } #ifdef RGBLIGHT_USE_TIMER if (syncinfo->status.change_flags & RGBLIGHT_STATUS_CHANGE_TIMER) { if (syncinfo->status.timer_enabled) { rgblight_timer_enable(); } else { rgblight_timer_disable(); } } #ifndef RGBLIGHT_SPLIT_NO_ANIMATION_SYNC if (syncinfo->status.change_flags & RGBLIGHT_STATUS_ANIMATION_TICK) { animation_status.restart = true; } #endif /* RGBLIGHT_SPLIT_NO_ANIMATION_SYNC */ #endif /* RGBLIGHT_USE_TIMER */ }
void rgblight_toggle_noeeprom(void) { xprintf("rgblight toggle [NOEEPROM]: rgblight_config.enable = %u\n", !rgblight_config.enable); if (rgblight_config.enable) { rgblight_disable_noeeprom(); } else { rgblight_enable_noeeprom(); } }
void led_set_user(uint8_t usb_led) { // Turn LEDs On/Off for Caps Lock if (host_keyboard_leds() & (1 << USB_LED_CAPS_LOCK)) { rgblight_enable_noeeprom(); rgblight_sethsv_noeeprom(0, 0, 80); } else { rgblight_sethsv_noeeprom(0, 0, 80); rgblight_disable_noeeprom(); } }