]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Change rgblight_get_mode & rgb_matrix_get_mode's return type to uint8_t. (#4747)
authorDavid Dai <newtonapple@gmail.com>
Mon, 31 Dec 2018 16:42:58 +0000 (08:42 -0800)
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>
Mon, 31 Dec 2018 16:42:58 +0000 (08:42 -0800)
* Change rgblight_get_mode's return type to uint8_t.

Since rgblight_get_mode() is just returning rgblight_config_t.mode,
it should match rgblight_config_t.mode's type: uint8_t.

* Update rgb_matrix_get_mode to return uint8_t.

keyboards/mxss/rgblight.c
quantum/rgb_matrix.c
quantum/rgb_matrix.h
quantum/rgblight.c
quantum/rgblight.h

index da7959c6a85c7232055b3d6049ee9fdf6a491562..73f94f3ab0ada5717cbdfab74f04e9453d413b89 100644 (file)
@@ -234,7 +234,7 @@ void rgblight_step_reverse(void) {
   rgblight_mode(mode);
 }
 
-uint32_t rgblight_get_mode(void) {
+uint8_t rgblight_get_mode(void) {
   if (!rgblight_config.enable) {
     return false;
   }
index 82d36177b5bdef4ede7e4a1f9257f2332f5fc713..2ed36304dca5c929acef0e9f15d655835177f02f 100644 (file)
@@ -973,7 +973,7 @@ void rgb_matrix_mode_noeeprom(uint8_t mode) {
     rgb_matrix_config.mode = mode;
 }
 
-uint32_t rgb_matrix_get_mode(void) {
+uint8_t rgb_matrix_get_mode(void) {
     return rgb_matrix_config.mode;
 }
 
index 0cfeb4e069a8a4c1c48b0ef3fb30d1c2ac1a1a0a..e43532d11e77edf6781a0fc3fc448c1bfae01b27 100644 (file)
@@ -180,7 +180,7 @@ void rgb_matrix_increase_speed(void);
 void rgb_matrix_decrease_speed(void);
 void rgb_matrix_mode(uint8_t mode);
 void rgb_matrix_mode_noeeprom(uint8_t mode);
-uint32_t rgb_matrix_get_mode(void);
+uint8_t rgb_matrix_get_mode(void);
 
 #ifndef RGBLIGHT_ENABLE
 #define rgblight_toggle() rgb_matrix_toggle()
index ae5dca18844e239c56f3940e1de9941bc9c8032c..23420ddd87dd50007bedbfc150ee1912d37eb356 100644 (file)
@@ -234,7 +234,7 @@ void rgblight_step_reverse(void) {
   rgblight_step_reverse_helper(true);
 }
 
-uint32_t rgblight_get_mode(void) {
+uint8_t rgblight_get_mode(void) {
   if (!rgblight_config.enable) {
     return false;
   }
index 99ede43c5b534602feb0f91014cecd8aa4c73545..65dda3f5215f06d23abbe6eea99e1ed4622674b1 100644 (file)
@@ -167,7 +167,7 @@ void rgblight_enable(void);
 void rgblight_disable(void);
 void rgblight_step(void);
 void rgblight_step_reverse(void);
-uint32_t rgblight_get_mode(void);
+uint8_t rgblight_get_mode(void);
 void rgblight_mode(uint8_t mode);
 void rgblight_set(void);
 void rgblight_update_dword(uint32_t dword);