diff options
| author | Takeshi ISHII <2170248+mtei@users.noreply.github.com> | 2019-04-20 07:05:51 +0900 |
|---|---|---|
| committer | Drashna Jaelre <drashna@live.com> | 2019-04-19 15:05:51 -0700 |
| commit | dfab177f889fd6701e5f898c869be1bf3a2d0ef9 (patch) | |
| tree | 5dd9582cf5271389e931530bf2c8689299b8512d /quantum/rgblight_modes.h | |
| parent | dd64a4e73868027b44a018278039cc42a01e730b (diff) | |
| download | qmk_firmware-dfab177f889fd6701e5f898c869be1bf3a2d0ef9.tar.gz qmk_firmware-dfab177f889fd6701e5f898c869be1bf3a2d0ef9.zip | |
Add function to support split-keyboard in rgblight.[ch]. (#5020)
* add temporary file that is rgblight.c call graph
* add rgblight_update_hook()
* update rgblight-call-graph.dot (temporary file)
* add more hook point
* add TODO comment
* temporary Revert "add TODO comment"
This reverts commit df6165aac9b3a31d1d3e31ce52aadc134b84eac2.
* temporary Revert "add more hook point"
This reverts commit 64592b06f3bcdaac47c59f922018a273bef76776.
* temporary Revert "add rgblight_update_hook()"
This reverts commit 432b74c912ed4333e6633e20a1bcda10c6a10eaf.
* add rgblight_update_hook()
* add more hook point
* add TODO comment
* implement rgblight_update_hook()
* remove rgblight_update_hook(), add RGBLIGHT_SPLIT_SET_CHANGE_XXXX
rgblight_update_hook() is too large.
change to simple flag setting.
* shrink rgblight_config_t
* implement rgblight_update_sync()
Note: The animation synchronization process has not been implemented yet.
* update quantum/rgblight-call-graph.dot (temporary file)
* rmove quantum/rgblight-call-graph.dot (temporary file)
* update rgblight.c
* Add temporary code to Helix keyboard 'five_rows' keymap to test rgblight.c .
* fix build break rgblight_update_sync() when all animation off
* fix quantum/rgblight.c:rgblight_disable_XX() add RGBLIGHT_SPLIT_SET_CHANGE_MODE
* quantum/rgblight.c change code order: move rgblight_update_sync()
* add mode_base_table[] to quantum/rgblight.c
* quantum/rgblight.c use mode_base_table[] and rgblight_status.base_mode
* quantum/rgblkght.c animation timer integration
* quantum/rgblkght.c add animation sync for split keyboard
* fix mode_base_table[] and snake effect
* fix build break keyboards/mxss.
keyboards/mxss's local rgblight.c need old version rgblight.h
* rgblight.c: fix animation sync
* quantum/rgblight.c: fix snake effect sync
* quantum/rgblight.c: animation sync interverl 30 sec
* quantum/rgblight.c: fix rgblight_effect_rainbow_swirl() and rgblight_effect_knight()
* quantum/rgblight.c: add macro RGBLIGHT_SPLIT_ANIMATION
* cherry-pick from 'rgblight_modes.h sample implementation'
* fix RGBLIGHT_SPLIT_ANIMATION check position
* Update temporary code in Helix keyboard 'five_rows' keymap to test rgblight.c
* Reduce the firmware size by 1500 bytes when rgblight_effect_breathing() is enabled.
* Changed to rgblight_sethsv_eeprom_helper() for easier reading.
* add fail-safe code to quantum/rgblight.c:rgblight_task(),rgblight_timer_enable()
* remove temporary code in Helix keyboard 'five_rows' keymap
* quantum/rgblight.c: add split-keyboard master side sync functions
add functions:
uint8_t rgblight_get_change_flags(void);
void rgblight_clear_change_flags(void);
void rgblight_get_syncinfo(rgblight_syncinfo_t *syncinfo);
change function:
void rgblight_update_sync(rgblight_syncinfo_t *syncinfo, bool write_to_eeprom);
* Change rgblight_update_sync() to use write_to_eeprom.
* remove TODO comment from quantum/rgblight.h
* Revert "fix build break keyboards/mxss."
This reverts commit 90b9a1aa7d8af226751500e49e3ea0214cc4e024.
(Separated this change into the newly opened PR #5461.)
* Revert "Reduce the firmware size by 1500 bytes when rgblight_effect_breathing() is enabled."
This reverts commit b61004e63e82cf5334cee4def4ba10cffa88885f.
* update quantum/rgblight.c: Code size reduction when not using RGBLIGHT_SPLIT.
* Add temporary code to Helix keyboard 'five_rows' keymap to test rgblight.c .
* add temporary pdhelix(Patched Helix) code
* Add temporary code to split_common/transport.c to test rgblight.c.
* Finish testing rgblight.c with helix keyboard.
Revert "Add temporary code to Helix keyboard 'five_rows' keymap to test rgblight.c ."
This reverts commit 0bf81a4723a977adc0cb09b4272ee5c9b4f2bbbb.
* Finish testing rgblight.c with quantum/split_common code.
Revert "Add temporary code to split_common/transport.c to test rgblight.c."
This reverts commit 71db3e24eef40d4c455fb9fd1664e4487c9d927a.
* remove temporary pdhelix(Patched Helix) code
This reverts commit 5287e51a394741bcb6028c7cfc0dd0c984645f76.
* Added description of RGBLIGHT_SPLIT macro to docs/feature_rgblight.md.
* add RGBLIGHT_SPLIT_SET_CHANGE_HSVS to rgblight_init()
* Changed to restart animation only when changing mode.
When changing hue, sat and val, the animation is not restarted and continues.
Diffstat (limited to 'quantum/rgblight_modes.h')
| -rw-r--r-- | quantum/rgblight_modes.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/quantum/rgblight_modes.h b/quantum/rgblight_modes.h new file mode 100644 index 000000000..8a8f9bdda --- /dev/null +++ b/quantum/rgblight_modes.h | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | #ifdef _RGBM_SINGLE_STATIC | ||
| 2 | _RGBM_SINGLE_STATIC( STATIC_LIGHT ) | ||
| 3 | #ifdef RGBLIGHT_EFFECT_BREATHING | ||
| 4 | _RGBM_MULTI_DYNAMIC( BREATHING ) | ||
| 5 | _RGBM_TMP_DYNAMIC( breathing_3, BREATHING ) | ||
| 6 | _RGBM_TMP_DYNAMIC( breathing_4, BREATHING ) | ||
| 7 | _RGBM_TMP_DYNAMIC( BREATHING_end, BREATHING ) | ||
| 8 | #endif | ||
| 9 | #ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD | ||
| 10 | _RGBM_MULTI_DYNAMIC( RAINBOW_MOOD ) | ||
| 11 | _RGBM_TMP_DYNAMIC( rainbow_mood_7, RAINBOW_MOOD ) | ||
| 12 | _RGBM_TMP_DYNAMIC( RAINBOW_MOOD_end, RAINBOW_MOOD ) | ||
| 13 | #endif | ||
| 14 | #ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL | ||
| 15 | _RGBM_MULTI_DYNAMIC( RAINBOW_SWIRL ) | ||
| 16 | _RGBM_TMP_DYNAMIC( rainbow_swirl_10, RAINBOW_SWIRL ) | ||
| 17 | _RGBM_TMP_DYNAMIC( rainbow_swirl_11, RAINBOW_SWIRL ) | ||
| 18 | _RGBM_TMP_DYNAMIC( rainbow_swirl_12, RAINBOW_SWIRL ) | ||
| 19 | _RGBM_TMP_DYNAMIC( rainbow_swirl_13, RAINBOW_SWIRL ) | ||
| 20 | _RGBM_TMP_DYNAMIC( RAINBOW_SWIRL_end, RAINBOW_SWIRL ) | ||
| 21 | #endif | ||
| 22 | #ifdef RGBLIGHT_EFFECT_SNAKE | ||
| 23 | _RGBM_MULTI_DYNAMIC( SNAKE ) | ||
| 24 | _RGBM_TMP_DYNAMIC( snake_16, SNAKE ) | ||
| 25 | _RGBM_TMP_DYNAMIC( snake_17, SNAKE ) | ||
| 26 | _RGBM_TMP_DYNAMIC( snake_18, SNAKE ) | ||
| 27 | _RGBM_TMP_DYNAMIC( snake_19, SNAKE ) | ||
| 28 | _RGBM_TMP_DYNAMIC( SNAKE_end, SNAKE ) | ||
| 29 | #endif | ||
| 30 | #ifdef RGBLIGHT_EFFECT_KNIGHT | ||
| 31 | _RGBM_MULTI_DYNAMIC( KNIGHT ) | ||
| 32 | _RGBM_TMP_DYNAMIC( knight_22, KNIGHT ) | ||
| 33 | _RGBM_TMP_DYNAMIC( KNIGHT_end, KNIGHT ) | ||
| 34 | #endif | ||
| 35 | #ifdef RGBLIGHT_EFFECT_CHRISTMAS | ||
| 36 | _RGBM_SINGLE_DYNAMIC( CHRISTMAS ) | ||
| 37 | #endif | ||
| 38 | #ifdef RGBLIGHT_EFFECT_STATIC_GRADIENT | ||
| 39 | _RGBM_MULTI_STATIC( STATIC_GRADIENT ) | ||
| 40 | _RGBM_TMP_STATIC( static_gradient_26, STATIC_GRADIENT ) | ||
| 41 | _RGBM_TMP_STATIC( static_gradient_27, STATIC_GRADIENT ) | ||
| 42 | _RGBM_TMP_STATIC( static_gradient_28, STATIC_GRADIENT ) | ||
| 43 | _RGBM_TMP_STATIC( static_gradient_29, STATIC_GRADIENT ) | ||
| 44 | _RGBM_TMP_STATIC( static_gradient_30, STATIC_GRADIENT ) | ||
| 45 | _RGBM_TMP_STATIC( static_gradient_31, STATIC_GRADIENT ) | ||
| 46 | _RGBM_TMP_STATIC( static_gradient_32, STATIC_GRADIENT ) | ||
| 47 | _RGBM_TMP_STATIC( static_gradient_33, STATIC_GRADIENT ) | ||
| 48 | _RGBM_TMP_STATIC( STATIC_GRADIENT_end, STATIC_GRADIENT ) | ||
| 49 | #endif | ||
| 50 | #ifdef RGBLIGHT_EFFECT_RGB_TEST | ||
| 51 | _RGBM_SINGLE_DYNAMIC( RGB_TEST ) | ||
| 52 | #endif | ||
| 53 | #ifdef RGBLIGHT_EFFECT_ALTERNATING | ||
| 54 | _RGBM_SINGLE_DYNAMIC( ALTERNATING ) | ||
| 55 | #endif | ||
| 56 | //// Add a new mode here. | ||
| 57 | // #ifdef RGBLIGHT_EFFECT_<name> | ||
| 58 | // _RGBM_<SINGLE|MULTI>_<STATIC|DYNAMIC>( <name> ) | ||
| 59 | // #endif | ||
| 60 | #endif | ||
| 61 | |||
| 62 | #undef _RGBM_SINGLE_STATIC | ||
| 63 | #undef _RGBM_SINGLE_DYNAMIC | ||
| 64 | #undef _RGBM_MULTI_STATIC | ||
| 65 | #undef _RGBM_MULTI_DYNAMIC | ||
| 66 | #undef _RGBM_TMP_STATIC | ||
| 67 | #undef _RGBM_TMP_DYNAMIC | ||
