diff options
author | QMK Bot <hello@qmk.fm> | 2020-03-10 20:24:13 +0000 |
---|---|---|
committer | QMK Bot <hello@qmk.fm> | 2020-03-10 20:24:13 +0000 |
commit | 1aa40dde46ae38e2768fd23e4d7a3bdd8838f724 (patch) | |
tree | 5db72dfae3dd6d3f6d5e3247b37e56cc795e3859 /quantum/rgblight.h | |
parent | 2ffb08843ba59f0af0870335934bdb277fc85620 (diff) |
format code according to conventions [skip ci]
Diffstat (limited to 'quantum/rgblight.h')
-rw-r--r-- | quantum/rgblight.h | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/quantum/rgblight.h b/quantum/rgblight.h index 40f267daa2..97882c5b29 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h @@ -172,25 +172,28 @@ enum RGBLIGHT_EFFECT_MODE { # ifdef RGBLIGHT_LAYERS typedef struct { - uint8_t index; // The first LED to light - uint8_t count; // The number of LEDs to light + uint8_t index; // The first LED to light + uint8_t count; // The number of LEDs to light uint8_t hue; uint8_t sat; uint8_t val; } rgblight_segment_t; -# define RGBLIGHT_END_SEGMENT_INDEX (255) -# define RGBLIGHT_END_SEGMENTS {RGBLIGHT_END_SEGMENT_INDEX, 0, 0, 0} +# define RGBLIGHT_END_SEGMENT_INDEX (255) +# define RGBLIGHT_END_SEGMENTS \ + { RGBLIGHT_END_SEGMENT_INDEX, 0, 0, 0 } # define RGBLIGHT_MAX_LAYERS 8 -# define RGBLIGHT_LAYER_SEGMENTS(...) { __VA_ARGS__, RGBLIGHT_END_SEGMENTS } -# define RGBLIGHT_LAYERS_LIST(...) { __VA_ARGS__, NULL } +# define RGBLIGHT_LAYER_SEGMENTS(...) \ + { __VA_ARGS__, RGBLIGHT_END_SEGMENTS } +# define RGBLIGHT_LAYERS_LIST(...) \ + { __VA_ARGS__, NULL } // Get/set enabled rgblight layers void rgblight_set_layer_state(uint8_t layer, bool enabled); bool rgblight_get_layer_state(uint8_t layer); // Point this to an array of rgblight_segment_t arrays in keyboard_post_init_user to use rgblight layers -extern const rgblight_segment_t * const * rgblight_layers; +extern const rgblight_segment_t *const *rgblight_layers; # endif extern LED_TYPE led[RGBLED_NUM]; @@ -320,19 +323,19 @@ void rgblight_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom); # define EZ_RGB(val) rgblight_show_solid_color((val >> 16) & 0xFF, (val >> 8) & 0xFF, val & 0xFF) void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b); -#ifdef RGBLIGHT_USE_TIMER +# ifdef RGBLIGHT_USE_TIMER void rgblight_task(void); void rgblight_timer_init(void); void rgblight_timer_enable(void); void rgblight_timer_disable(void); void rgblight_timer_toggle(void); -#else -#define rgblight_task() -#define rgblight_timer_init() -#define rgblight_timer_enable() -#define rgblight_timer_disable() -#define rgblight_timer_toggle() -#endif +# else +# define rgblight_task() +# define rgblight_timer_init() +# define rgblight_timer_enable() +# define rgblight_timer_disable() +# define rgblight_timer_toggle() +# endif # ifdef RGBLIGHT_SPLIT # define RGBLIGHT_STATUS_CHANGE_MODE (1 << 0) |