]> git.donarmstrong.com Git - qmk_firmware.git/blob - users/zer09/lights.h
Remove more commented out MCUs
[qmk_firmware.git] / users / zer09 / lights.h
1 #ifndef LIGHTS_H
2 #define LIGHTS_H
3
4 #include "eeprom.h"
5 #include "tap_dance.h"
6 #include "zer09.h"
7
8 /* Will hold the RGB brightness level */
9 #define EECONFIG_LED_DIM_LVL (uint8_t *)15
10
11 #define SET_LED_RGB(r, g, b, led_dim, pos)                                     \
12   setrgb(r >> led_dim, g >> led_dim, b >> led_dim, (LED_TYPE *)&led[pos])
13
14 typedef enum {
15   DEFAULT,
16   ENABLED,
17   DISABLED,
18 } led_status;
19
20 typedef struct {
21   led_status status;
22   uint8_t pos;
23   bool forced;
24 } led_key;
25
26 enum rbw_keys {
27   RBW_LCTL,
28   RBW_LCAP,
29   RBW_LSPR,
30   RBW_RCTL,
31   RBW_RCAP,
32   RBW_RALT,
33   RBW_SCRL,
34   RBW
35 };
36
37 extern volatile led_key rbw_led_keys[RBW];
38
39 void set_key_led(keyrecord_t *record, uint8_t lyr);
40 bool set_layer_led(uint8_t lyr);
41 bool rainbow_loop(uint8_t lyr);
42 bool led_brightness(uint16_t keycode, keyrecord_t *record);
43 void eeprom_read_led_dim_lvl(void);
44
45 #endif