summaryrefslogtreecommitdiff
path: root/keyboards/xelus/pachi/rgb/rev2/rev2.h
blob: d6a05b726453605b940834ba56541383e063bc7c (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/* Copyright 2023 Harrison Chan (Xelus)
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
#pragma once

#include "quantum.h"

#ifdef VIA_ENABLE
// custom ID codes
enum via_indicator_value {
    id_caps_lock_enable = 1,
    id_caps_lock_brightness,
    id_caps_lock_color,
    id_caps_lock_key,
    id_caps_lock_override,
    id_num_lock_enable,
    id_num_lock_brightness,
    id_num_lock_color,
    id_num_lock_key,
    id_num_lock_override,
    id_scroll_lock_enable,
    id_scroll_lock_brightness,
    id_scroll_lock_color,
    id_scroll_lock_key,
    id_scroll_lock_override,
    id_layer_indicator_enable,
    id_layer_indicator_brightness,
    id_layer_indicator_color,
    id_layer_indicator_key,
    id_layer_indicator_override
};

// struct to save things
typedef struct {
    bool enable_caps_lock:1;            // |
    bool enable_num_lock:1;             // |
    bool enable_scroll_lock:1;          // |
    bool enable_layer_indicator:1;      // |
    bool caps_override_bl:1;            // |
    bool num_override_bl:1;             // |
    bool scroll_override_bl:1;          // |
    bool layer_override_bl:1;           // 1 byte
    HSV caps_lock_indicator;    // 3 bytes
    HSV num_lock_indicator;     // 3 bytes
    HSV scroll_lock_indicator;  // 3 bytes
    HSV layer_indicator;        // 3 bytes
    uint8_t caps_lock_key;      // 1 byte
    uint8_t num_lock_key;       // 1 byte
    uint8_t scroll_lock_key;    // 1 byte
    uint8_t layer_indicator_key;// 1 byte
} indicator_settings_config;
// total 17 bytes

// function declaration
void indicator_config_set_value( uint8_t *data );
void indicator_config_get_value( uint8_t *data );
void indicator_config_save ( void );
void _set_color(HSV *color, uint8_t *data);
void _get_color(HSV *color, uint8_t *data);
#endif

#define _____ KC_NO

#define LAYOUT_tkl_ansi_tsangan( \
    K0000,        K0001, K0101, K0002, K0102, K0003, K0103, K0004, K0104, K0005, K0105, K0006, K0106, K0007, K0107, K0008, \
    K0200, K0300, K0201, K0301, K0202, K0302, K0203, K0303, K0204, K0304, K0205, K0305, K0206, K0306, K0207, K0307, K0208, \
    K0400, K0500, K0401, K0501, K0402, K0502, K0403, K0503, K0404, K0504, K0405, K0505, K0406, K0506, K0407, K0507, K0408, \
    K0600, K0700, K0601, K0701, K0602, K0702, K0603, K0703, K0604, K0704, K0605, K0705,        K0706,                      \
    K0800, K0900, K0801, K0901, K0802, K0902, K0803, K0903, K0804, K0904, K0805,        K0806,               K0907,        \
    K1000, K1100, K1001,               K1102,                             K1005,        K1006, K1106, K1007, K1107, K1008  \
) { \
    { K0000, K0001, K0002, K0003, K0004, K0005, K0006, K0007, K0008 }, \
    { _____, K0101, K0102, K0103, K0104, K0105, K0106, K0107, _____ }, \
    { K0200, K0201, K0202, K0203, K0204, K0205, K0206, K0207, K0208 }, \
    { K0300, K0301, K0302, K0303, K0304, K0305, K0306, K0307, _____ }, \
    { K0400, K0401, K0402, K0403, K0404, K0405, K0406, K0407, K0408 }, \
    { K0500, K0501, K0502, K0503, K0504, K0505, K0506, K0507, _____ }, \
    { K0600, K0601, K0602, K0603, K0604, K0605, _____, _____, _____ }, \
    { K0700, K0701, K0702, K0703, K0704, K0705, K0706, _____, _____ }, \
    { K0800, K0801, K0802, K0803, K0804, K0805, K0806, _____, _____ }, \
    { K0900, K0901, K0902, K0903, K0904, _____, _____, K0907, _____ }, \
    { K1000, K1001, _____, _____, _____, K1005, K1006, K1007, K1008 }, \
    { K1100, _____, K1102, _____, _____, _____, K1106, K1107, _____ }  \
}