summaryrefslogtreecommitdiff
path: root/quantum/tri_layer.c
blob: a5e3f8cb477f7681c6917a03d0ba74550ea8baec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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;
}