diff options
Diffstat (limited to 'common/action_code.h')
| -rw-r--r-- | common/action_code.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/common/action_code.h b/common/action_code.h index 0933dce13..d28b74f84 100644 --- a/common/action_code.h +++ b/common/action_code.h | |||
| @@ -85,6 +85,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 85 | * 1100|opt | id(8) Macro play? | 85 | * 1100|opt | id(8) Macro play? |
| 86 | * 1100|1111| id(8) Macro record? | 86 | * 1100|1111| id(8) Macro record? |
| 87 | * | 87 | * |
| 88 | * ACT_BACKLIGHT(1101): | ||
| 89 | * 1110|xxxx| id(8) Backlight commands | ||
| 90 | * | ||
| 88 | * ACT_COMMAND(1110): | 91 | * ACT_COMMAND(1110): |
| 89 | * 1110|opt | id(8) Built-in Command exec | 92 | * 1110|opt | id(8) Built-in Command exec |
| 90 | * | 93 | * |
| @@ -109,6 +112,7 @@ enum action_kind_id { | |||
| 109 | ACT_LAYER_TAP1 = 0b1011, | 112 | ACT_LAYER_TAP1 = 0b1011, |
| 110 | /* Extensions */ | 113 | /* Extensions */ |
| 111 | ACT_MACRO = 0b1100, | 114 | ACT_MACRO = 0b1100, |
| 115 | ACT_BACKLIGHT = 0b1101, | ||
| 112 | ACT_COMMAND = 0b1110, | 116 | ACT_COMMAND = 0b1110, |
| 113 | ACT_FUNCTION = 0b1111 | 117 | ACT_FUNCTION = 0b1111 |
| 114 | }; | 118 | }; |
| @@ -157,6 +161,9 @@ typedef union { | |||
| 157 | uint8_t page :2; | 161 | uint8_t page :2; |
| 158 | uint8_t kind :4; | 162 | uint8_t kind :4; |
| 159 | } usage; | 163 | } usage; |
| 164 | struct action_backlight { | ||
| 165 | uint8_t id :8; | ||
| 166 | } backlight; | ||
| 160 | struct action_command { | 167 | struct action_command { |
| 161 | uint8_t id :8; | 168 | uint8_t id :8; |
| 162 | uint8_t opt :4; | 169 | uint8_t opt :4; |
| @@ -272,10 +279,21 @@ enum layer_pram_tap_op { | |||
| 272 | /* | 279 | /* |
| 273 | * Extensions | 280 | * Extensions |
| 274 | */ | 281 | */ |
| 282 | enum backlight_id { | ||
| 283 | BACKLIGHT_INCREASE = 0, | ||
| 284 | BACKLIGHT_DECREASE = 1, | ||
| 285 | BACKLIGHT_TOGGLE = 2, | ||
| 286 | BACKLIGHT_STEP = 3, | ||
| 287 | }; | ||
| 275 | /* Macro */ | 288 | /* Macro */ |
| 276 | #define ACTION_MACRO(id) ACTION(ACT_MACRO, (id)) | 289 | #define ACTION_MACRO(id) ACTION(ACT_MACRO, (id)) |
| 277 | #define ACTION_MACRO_TAP(id) ACTION(ACT_MACRO, FUNC_TAP<<8 | (id)) | 290 | #define ACTION_MACRO_TAP(id) ACTION(ACT_MACRO, FUNC_TAP<<8 | (id)) |
| 278 | #define ACTION_MACRO_OPT(id, opt) ACTION(ACT_MACRO, (opt)<<8 | (id)) | 291 | #define ACTION_MACRO_OPT(id, opt) ACTION(ACT_MACRO, (opt)<<8 | (id)) |
| 292 | /* Backlight */ | ||
| 293 | #define ACTION_BACKLIGHT_INCREASE() ACTION(ACT_BACKLIGHT, BACKLIGHT_INCREASE) | ||
| 294 | #define ACTION_BACKLIGHT_DECREASE() ACTION(ACT_BACKLIGHT, BACKLIGHT_DECREASE) | ||
| 295 | #define ACTION_BACKLIGHT_TOGGLE() ACTION(ACT_BACKLIGHT, BACKLIGHT_TOGGLE) | ||
| 296 | #define ACTION_BACKLIGHT_STEP() ACTION(ACT_BACKLIGHT, BACKLIGHT_STEP) | ||
| 279 | /* Command */ | 297 | /* Command */ |
| 280 | #define ACTION_COMMAND(id, opt) ACTION(ACT_COMMAND, (opt)<<8 | (addr)) | 298 | #define ACTION_COMMAND(id, opt) ACTION(ACT_COMMAND, (opt)<<8 | (addr)) |
| 281 | /* Function */ | 299 | /* Function */ |
