diff options
author | lokher <lokher@gmail.com> | 2023-04-26 16:32:15 +0800 |
---|---|---|
committer | lokher <lokher@gmail.com> | 2023-04-26 16:32:15 +0800 |
commit | e4f4ceaf3f2e3d25fb282273a81f9b58790fc427 (patch) | |
tree | c0a257eab0ffe5238fdf2c04882e8ee1fe8fc46e /quantum/tri_layer.c | |
parent | 103badc87cb50db1ff3851c84331e86ba78fb681 (diff) |
merge upstream 713427c
Diffstat (limited to 'quantum/tri_layer.c')
-rw-r--r-- | quantum/tri_layer.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/quantum/tri_layer.c b/quantum/tri_layer.c new file mode 100644 index 0000000000..a5e3f8cb47 --- /dev/null +++ b/quantum/tri_layer.c @@ -0,0 +1,39 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "tri_layer.h" +#include <stdint.h> + +static uint8_t tri_layer_lower_layer = TRI_LAYER_LOWER_LAYER; +static uint8_t tri_layer_upper_layer = TRI_LAYER_UPPER_LAYER; +static uint8_t tri_layer_adjust_layer = TRI_LAYER_ADJUST_LAYER; + +void set_tri_layer_lower_layer(uint8_t layer) { + tri_layer_lower_layer = layer; +} + +void set_tri_layer_upper_layer(uint8_t layer) { + tri_layer_upper_layer = layer; +} + +void set_tri_layer_adjust_layer(uint8_t layer) { + tri_layer_adjust_layer = layer; +} + +void set_tri_layer_layers(uint8_t lower, uint8_t raise, uint8_t adjust) { + tri_layer_lower_layer = lower; + tri_layer_upper_layer = raise; + tri_layer_adjust_layer = adjust; +} + +uint8_t get_tri_layer_lower_layer(void) { + return tri_layer_lower_layer; +} + +uint8_t get_tri_layer_upper_layer(void) { + return tri_layer_upper_layer; +} + +uint8_t get_tri_layer_adjust_layer(void) { + return tri_layer_adjust_layer; +} |