aboutsummaryrefslogtreecommitdiff
path: root/common/action_code.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/action_code.h')
-rw-r--r--common/action_code.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/common/action_code.h b/common/action_code.h
index 8df86b119..50112d4d2 100644
--- a/common/action_code.h
+++ b/common/action_code.h
@@ -87,7 +87,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
87 * 1100|1111| id(8) Macro record? 87 * 1100|1111| id(8) Macro record?
88 * 88 *
89 * ACT_BACKLIGHT(1101): 89 * ACT_BACKLIGHT(1101):
90 * 1101|xxxx| id(8) Backlight commands 90 * 1101|opt |level(8) Backlight commands
91 * 91 *
92 * ACT_COMMAND(1110): 92 * ACT_COMMAND(1110):
93 * 1110|opt | id(8) Built-in Command exec 93 * 1110|opt | id(8) Built-in Command exec
@@ -163,7 +163,9 @@ typedef union {
163 uint8_t kind :4; 163 uint8_t kind :4;
164 } usage; 164 } usage;
165 struct action_backlight { 165 struct action_backlight {
166 uint8_t id :8; 166 uint8_t level :8;
167 uint8_t opt :4;
168 uint8_t kind :4;
167 } backlight; 169 } backlight;
168 struct action_command { 170 struct action_command {
169 uint8_t id :8; 171 uint8_t id :8;
@@ -282,21 +284,23 @@ enum layer_pram_tap_op {
282/* 284/*
283 * Extensions 285 * Extensions
284 */ 286 */
285enum backlight_id { 287enum backlight_opt {
286 BACKLIGHT_INCREASE = 0, 288 BACKLIGHT_INCREASE = 0,
287 BACKLIGHT_DECREASE = 1, 289 BACKLIGHT_DECREASE = 1,
288 BACKLIGHT_TOGGLE = 2, 290 BACKLIGHT_TOGGLE = 2,
289 BACKLIGHT_STEP = 3, 291 BACKLIGHT_STEP = 3,
292 BACKLIGHT_LEVEL = 4,
290}; 293};
291/* Macro */ 294/* Macro */
292#define ACTION_MACRO(id) ACTION(ACT_MACRO, (id)) 295#define ACTION_MACRO(id) ACTION(ACT_MACRO, (id))
293#define ACTION_MACRO_TAP(id) ACTION(ACT_MACRO, FUNC_TAP<<8 | (id)) 296#define ACTION_MACRO_TAP(id) ACTION(ACT_MACRO, FUNC_TAP<<8 | (id))
294#define ACTION_MACRO_OPT(id, opt) ACTION(ACT_MACRO, (opt)<<8 | (id)) 297#define ACTION_MACRO_OPT(id, opt) ACTION(ACT_MACRO, (opt)<<8 | (id))
295/* Backlight */ 298/* Backlight */
296#define ACTION_BACKLIGHT_INCREASE() ACTION(ACT_BACKLIGHT, BACKLIGHT_INCREASE) 299#define ACTION_BACKLIGHT_INCREASE() ACTION(ACT_BACKLIGHT, BACKLIGHT_INCREASE << 8)
297#define ACTION_BACKLIGHT_DECREASE() ACTION(ACT_BACKLIGHT, BACKLIGHT_DECREASE) 300#define ACTION_BACKLIGHT_DECREASE() ACTION(ACT_BACKLIGHT, BACKLIGHT_DECREASE << 8)
298#define ACTION_BACKLIGHT_TOGGLE() ACTION(ACT_BACKLIGHT, BACKLIGHT_TOGGLE) 301#define ACTION_BACKLIGHT_TOGGLE() ACTION(ACT_BACKLIGHT, BACKLIGHT_TOGGLE << 8)
299#define ACTION_BACKLIGHT_STEP() ACTION(ACT_BACKLIGHT, BACKLIGHT_STEP) 302#define ACTION_BACKLIGHT_STEP() ACTION(ACT_BACKLIGHT, BACKLIGHT_STEP << 8)
303#define ACTION_BACKLIGHT_LEVEL(level) ACTION(ACT_BACKLIGHT, BACKLIGHT_LEVEL << 8 | level)
300/* Command */ 304/* Command */
301#define ACTION_COMMAND(id, opt) ACTION(ACT_COMMAND, (opt)<<8 | (addr)) 305#define ACTION_COMMAND(id, opt) ACTION(ACT_COMMAND, (opt)<<8 | (addr))
302/* Function */ 306/* Function */