diff options
author | Wilba <Jason.S.Williams@gmail.com> | 2020-01-21 05:18:25 +1100 |
---|---|---|
committer | MechMerlin <30334081+mechmerlin@users.noreply.github.com> | 2020-01-20 10:18:25 -0800 |
commit | 484a9b12bc3961fc0dd9481d3cb734959db42191 (patch) | |
tree | ca2e4219b6514c1033be3ab3a975bd24f723f2ba /quantum/via.h | |
parent | ce81c4f89b61560ee35436b351b27fd23568c32f (diff) |
Add VIA support for QMK backlight, QMK RGBLight (#7911)
* Add VIA support for QMK backlight, QMK RGBLight
* clang-format changes
Diffstat (limited to 'quantum/via.h')
-rw-r--r-- | quantum/via.h | 58 |
1 files changed, 37 insertions, 21 deletions
diff --git a/quantum/via.h b/quantum/via.h index 98f8dea8c3..012547e055 100644 --- a/quantum/via.h +++ b/quantum/via.h @@ -51,29 +51,45 @@ #define VIA_PROTOCOL_VERSION 0x0009 enum via_command_id { - id_get_protocol_version = 0x01, // always 0x01 - id_get_keyboard_value, - id_set_keyboard_value, - id_dynamic_keymap_get_keycode, - id_dynamic_keymap_set_keycode, - id_dynamic_keymap_reset, - id_backlight_config_set_value, - id_backlight_config_get_value, - id_backlight_config_save, - id_eeprom_reset, - id_bootloader_jump, - id_dynamic_keymap_macro_get_count, - id_dynamic_keymap_macro_get_buffer_size, - id_dynamic_keymap_macro_get_buffer, - id_dynamic_keymap_macro_set_buffer, - id_dynamic_keymap_macro_reset, - id_dynamic_keymap_get_layer_count, - id_dynamic_keymap_get_buffer, - id_dynamic_keymap_set_buffer, - id_unhandled = 0xFF, + id_get_protocol_version = 0x01, // always 0x01 + id_get_keyboard_value = 0x02, + id_set_keyboard_value = 0x03, + id_dynamic_keymap_get_keycode = 0x04, + id_dynamic_keymap_set_keycode = 0x05, + id_dynamic_keymap_reset = 0x06, + id_lighting_set_value = 0x07, + id_lighting_get_value = 0x08, + id_lighting_save = 0x09, + id_eeprom_reset = 0x0A, + id_bootloader_jump = 0x0B, + id_dynamic_keymap_macro_get_count = 0x0C, + id_dynamic_keymap_macro_get_buffer_size = 0x0D, + id_dynamic_keymap_macro_get_buffer = 0x0E, + id_dynamic_keymap_macro_set_buffer = 0x0F, + id_dynamic_keymap_macro_reset = 0x10, + id_dynamic_keymap_get_layer_count = 0x11, + id_dynamic_keymap_get_buffer = 0x12, + id_dynamic_keymap_set_buffer = 0x13, + id_unhandled = 0xFF, }; -enum via_keyboard_value_id { id_uptime = 0x01, id_layout_options, id_switch_matrix_state }; +enum via_keyboard_value_id { + id_uptime = 0x01, // + id_layout_options = 0x02, + id_switch_matrix_state = 0x03 +}; + +enum via_lighting_value { + // QMK BACKLIGHT + id_qmk_backlight_brightness = 0x09, + id_qmk_backlight_effect = 0x0A, + + // QMK RGBLIGHT + id_qmk_rgblight_brightness = 0x80, + id_qmk_rgblight_effect = 0x81, + id_qmk_rgblight_effect_speed = 0x82, + id_qmk_rgblight_color = 0x83, +}; // Can't use SAFE_RANGE here, it might change if someone adds // new values to enum quantum_keycodes. |