diff options
author | marksard <38324387+marksard@users.noreply.github.com> | 2018-08-23 01:51:37 +0900 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2018-08-22 09:51:37 -0700 |
commit | 6076ed85be111f0e88c7049aa3d2e69eed5005a1 (patch) | |
tree | da704f8828a63245ea2333c883462b2f96591212 /keyboards/crkbd/keymaps/lib/rgb_state_reader.c | |
parent | 9d27d5544365b988575ca3face308d30feb40c86 (diff) | |
download | firmware-6076ed85be111f0e88c7049aa3d2e69eed5005a1.tar.gz firmware-6076ed85be111f0e88c7049aa3d2e69eed5005a1.tar.bz2 firmware-6076ed85be111f0e88c7049aa3d2e69eed5005a1.zip |
Keyboard: Partial refactor of the crkbd code (#3600)
* Add display to LED-parameters function
* Improvement of update timing for OLED display (Need TWI_Init)
Diffstat (limited to 'keyboards/crkbd/keymaps/lib/rgb_state_reader.c')
-rw-r--r-- | keyboards/crkbd/keymaps/lib/rgb_state_reader.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/keyboards/crkbd/keymaps/lib/rgb_state_reader.c b/keyboards/crkbd/keymaps/lib/rgb_state_reader.c new file mode 100644 index 000000000..e0efe2e52 --- /dev/null +++ b/keyboards/crkbd/keymaps/lib/rgb_state_reader.c @@ -0,0 +1,15 @@ +#ifdef RGBLIGHT_ENABLE + +#include QMK_KEYBOARD_H +#include <stdio.h> + +extern rgblight_config_t rgblight_config; +char rbf_info_str[24]; +const char *read_rgb_info(void) { + + snprintf(rbf_info_str, sizeof(rbf_info_str), "%s %2d h%3d s%3d v%3d", + rgblight_config.enable ? "on" : "- ", rgblight_config.mode, + rgblight_config.hue, rgblight_config.sat, rgblight_config.val); + return rbf_info_str; +} +#endif |