+#ifdef RGBLIGHT_SPLIT
+/* for split keyboard master side */
+uint8_t rgblight_get_change_flags(void) {
+ return rgblight_status.change_flags;
+}
+
+void rgblight_clear_change_flags(void) {
+ rgblight_status.change_flags = 0;
+}
+
+void rgblight_get_syncinfo(rgblight_syncinfo_t *syncinfo) {
+ syncinfo->config = rgblight_config;
+ syncinfo->status = rgblight_status;
+}
+
+/* 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 */
+}
+#endif /* RGBLIGHT_SPLIT */
+