diff options
author | XScorpion2 <rcalt2vt@gmail.com> | 2019-04-30 00:18:50 +0200 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2019-05-07 21:45:35 -0700 |
commit | 6364fe4efb3c2ac402d3d189a246e4428394840c (patch) | |
tree | d40cc19fe17d2afa6ff037bfddcb9be09571dfb5 /quantum/rgb_matrix_types.h | |
parent | ff3e430970fb38940598ae96e2c85d1cb9e15ad9 (diff) |
Updated rgb_led struct field modifier to flags (#5619)
Updated effects to test led flags
Updated massdrop to use new flags field for led toggle
Diffstat (limited to 'quantum/rgb_matrix_types.h')
-rw-r--r-- | quantum/rgb_matrix_types.h | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/quantum/rgb_matrix_types.h b/quantum/rgb_matrix_types.h index 908e96da56..7a3bc6714f 100644 --- a/quantum/rgb_matrix_types.h +++ b/quantum/rgb_matrix_types.h @@ -67,19 +67,21 @@ typedef union { }; } matrix_co_t; +#define HAS_FLAGS(bits, flags) ((bits & flags) == flags) +#define HAS_ANY_FLAGS(bits, flags) ((bits & flags) != 0x00) + +#define LED_FLAG_ALL 0xFF +#define LED_FLAG_NONE 0x00 +#define LED_FLAG_MODIFIER 0x01 +#define LED_FLAG_UNDERGLOW 0x02 +#define LED_FLAG_KEYLIGHT 0x04 + typedef struct PACKED { - matrix_co_t matrix_co; - point_t point; - uint8_t modifier:1; + matrix_co_t matrix_co; + point_t point; + uint8_t flags; } rgb_led; -typedef enum { - RGB_ZONE_OFF = 0, - RGB_ZONE_ALL, - RGB_ZONE_KEYS, - RGB_ZONE_UNDER, -} rgb_zone_t; - typedef union { uint32_t raw; struct PACKED { |