mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-16 12:51:47 +00:00
shrink rgblight_config_t
This commit is contained in:
parent
2ab340da54
commit
e1a9dfc580
@ -157,9 +157,9 @@ void rgblight_check_config(void) {
|
|||||||
/* for split keyboard master side */
|
/* for split keyboard master side */
|
||||||
/* Overwrite with individual code of keyboard. */
|
/* Overwrite with individual code of keyboard. */
|
||||||
|
|
||||||
#define RGBLIGHT_SPLIT_SET_CHANGE_MODE rgblight_status.change_mode = 1
|
#define RGBLIGHT_SPLIT_SET_CHANGE_MODE rgblight_status.change_flags |= RGBLIGHT_STATUS_CHANGE_MODE
|
||||||
#define RGBLIGHT_SPLIT_SET_CHANGE_HSVS rgblight_status.change_hsvs = 1
|
#define RGBLIGHT_SPLIT_SET_CHANGE_HSVS rgblight_status.change_flags |= RGBLIGHT_STATUS_CHANGE_HSVS
|
||||||
#define RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE rgblight_status.change_timer_enabled = 1
|
#define RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE rgblight_status.change_flags |= RGBLIGHT_STATUS_CHANGE_TIMER
|
||||||
|
|
||||||
/* for split keyboard slave side */
|
/* for split keyboard slave side */
|
||||||
/* Call from keyboard individual code. */
|
/* Call from keyboard individual code. */
|
||||||
|
@ -165,18 +165,20 @@ typedef union {
|
|||||||
|
|
||||||
typedef struct _rgblight_status_t {
|
typedef struct _rgblight_status_t {
|
||||||
bool timer_enabled;
|
bool timer_enabled;
|
||||||
bool change_mode; // change mode or enable
|
#ifdef RGBLIGHT_SPLIT
|
||||||
bool change_hsvs; // change hue, sat, val or speed
|
uint8_t change_flags;
|
||||||
bool change_timer_enabled;
|
|
||||||
// TODO: add animation syncronizing
|
// TODO: add animation syncronizing
|
||||||
// (with integrate timer processing.)
|
// (with integrate timer processing.)
|
||||||
|
#endif
|
||||||
} rgblight_status_t;
|
} rgblight_status_t;
|
||||||
|
|
||||||
#ifdef RGBLIGHT_SPLIT
|
#ifdef RGBLIGHT_SPLIT
|
||||||
/* for split keyboard master side */
|
#define RGBLIGHT_STATUS_CHANGE_MODE (1<<0)
|
||||||
void rgblight_update_hook(rgblight_config_t *config, rgblight_status_t *status, bool write_to_eeprom);
|
#define RGBLIGHT_STATUS_CHANGE_HSVS (1<<1)
|
||||||
/* for split keyboard slave side */
|
#define RGBLIGHT_STATUS_CHANGE_TIMER (1<<2)
|
||||||
void rgblight_update_sync(rgblight_config_t *config, rgblight_status_t *status, bool write_to_eeprom);
|
|
||||||
|
/* for split keyboard slave side */
|
||||||
|
void rgblight_update_sync(rgblight_config_t *config, rgblight_status_t *status, bool write_to_eeprom);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void rgblight_init(void);
|
void rgblight_init(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user