refactor(rgb): Expose explicit on/off command/API.

This commit is contained in:
Pete Johanson
2021-01-20 10:57:03 -05:00
parent 24ed1a8eaa
commit bb2c478af9
4 changed files with 76 additions and 54 deletions

View File

@@ -5,19 +5,23 @@
*/
#define RGB_TOG_CMD 0
#define RGB_HUI_CMD 1
#define RGB_HUD_CMD 2
#define RGB_SAI_CMD 3
#define RGB_SAD_CMD 4
#define RGB_BRI_CMD 5
#define RGB_BRD_CMD 6
#define RGB_SPI_CMD 7
#define RGB_SPD_CMD 8
#define RGB_EFF_CMD 9
#define RGB_EFR_CMD 10
#define RGB_COLOR_HSB_CMD 11
#define RGB_ON_CMD 1
#define RGB_OFF_CMD 2
#define RGB_HUI_CMD 3
#define RGB_HUD_CMD 4
#define RGB_SAI_CMD 5
#define RGB_SAD_CMD 6
#define RGB_BRI_CMD 7
#define RGB_BRD_CMD 8
#define RGB_SPI_CMD 9
#define RGB_SPD_CMD 10
#define RGB_EFF_CMD 11
#define RGB_EFR_CMD 12
#define RGB_COLOR_HSB_CMD 13
#define RGB_TOG RGB_TOG_CMD 0
#define RGB_ON RGB_ON_CMD 0
#define RGB_OFF RGB_OFF_CMD 0
#define RGB_HUI RGB_HUI_CMD 0
#define RGB_HUD RGB_HUD_CMD 0
#define RGB_SAI RGB_SAI_CMD 0

View File

@@ -7,6 +7,9 @@
#pragma once
int zmk_rgb_underglow_toggle();
int zmk_rgb_underglow_get_state(bool *state);
int zmk_rgb_underglow_on();
int zmk_rgb_underglow_off();
int zmk_rgb_underglow_cycle_effect(int direction);
int zmk_rgb_underglow_change_hue(int direction);
int zmk_rgb_underglow_change_sat(int direction);