aboutsummaryrefslogtreecommitdiff
path: root/keyboards/crkbd/rev1/rev1.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/crkbd/rev1/rev1.c')
-rw-r--r--keyboards/crkbd/rev1/rev1.c96
1 files changed, 96 insertions, 0 deletions
diff --git a/keyboards/crkbd/rev1/rev1.c b/keyboards/crkbd/rev1/rev1.c
new file mode 100644
index 000000000..63e4bed52
--- /dev/null
+++ b/keyboards/crkbd/rev1/rev1.c
@@ -0,0 +1,96 @@
1/*
2Copyright 2019 @foostan
3Copyright 2020 Drashna Jaelre <@drashna>
4
5This program is free software: you can redistribute it and/or modify
6it under the terms of the GNU General Public License as published by
7the Free Software Foundation, either version 2 of the License, or
8(at your option) any later version.
9
10This program is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18#include "rev1.h"
19
20#ifdef RGB_MATRIX_ENABLE
21
22 // Logical Layout
23 // Columns
24 // Left
25 // 0 1 2 3 4 5
26 // ROWS
27 // 25 24 19 18 11 10 0
28 // 03 02 01
29 // 26 23 20 17 12 09 1
30 // 04 05 06
31 // 27 22 21 16 13 08 2
32 //
33 // 15 14 07 3
34 //
35 // Right
36 // 0 1 2 3 4 5
37 // ROWS
38 // 25 24 19 18 11 10 4
39 // 03 02 01
40 // 26 23 20 17 12 09 5
41 // 04 05 06
42 // 27 22 21 16 13 08 6
43 //
44 // 15 14 07 7
45 //
46 // Physical Layout
47 // Columns
48 // 0 1 2 3 4 5 6 7 8 9 10 11 12 13
49 // ROWS
50 // 25 24 19 18 11 10 10 11 18 19 24 25 0
51 // 03 02 01 01 02 03
52 // 26 23 20 17 12 09 09 12 17 20 23 26 1
53 // 04 04
54 // 27 22 21 16 13 08 08 13 16 21 22 27 2
55 // 05 06 06 05
56 // 15 14 07 07 14 15 3
57
58led_config_t g_led_config = { {
59 { 24, 23, 18, 17, 10, 9 },
60 { 25, 22, 19, 16, 11, 8 },
61 { 26, 21, 20, 15, 12, 7 },
62 { NO_LED, NO_LED, NO_LED, 14, 13, 6 },
63 { 51, 50, 45, 44, 37, 36 },
64 { 52, 49, 46, 43, 38, 35 },
65 { 53, 48, 47, 42, 39, 34 },
66 { NO_LED, NO_LED, NO_LED, 41, 40, 33 }
67}, {
68 { 85, 16 }, { 50, 13 }, { 16, 20 }, { 16, 38 }, { 50, 48 }, { 85, 52 }, { 95, 63 },
69 { 85, 39 }, { 85, 21 }, { 85, 4 }, { 68, 2 }, { 68, 19 }, { 68, 37 }, { 80, 58 },
70 { 60, 55 }, { 50, 35 }, { 50, 13 }, { 50, 0 }, { 33, 3 }, { 33, 20 }, { 33, 37 },
71 { 16, 42 }, { 16, 24 }, { 16, 7 }, { 0, 7 }, { 0, 24 }, { 0, 41 }, { 139, 16 },
72 { 174, 13 }, { 208, 20 }, { 208, 38 }, { 174, 48 }, { 139, 52 }, { 129, 63 }, { 139, 39 },
73 { 139, 21 }, { 139, 4 }, { 156, 2 }, { 156, 19 }, { 156, 37 }, { 144, 58 }, { 164, 55 },
74 { 174, 35 }, { 174, 13 }, { 174, 0 }, { 191, 3 }, { 191, 20 }, { 191, 37 }, { 208, 42 },
75 { 208, 24 }, { 208, 7 }, { 224, 7 }, { 224, 24 }, { 224, 41 }
76}, {
77 2, 2, 2, 2, 2, 2, 1,
78 4, 4, 4, 4, 4, 4, 1,
79 1, 4, 4, 4, 4, 4, 4,
80 4, 4, 4, 1, 1, 1, 2,
81 2, 2, 2, 2, 2, 1, 4,
82 4, 4, 4, 4, 4, 1, 1,
83 4, 4, 4, 4, 4, 4, 4,
84 4, 4, 1, 1, 1
85} };
86
87void suspend_power_down_kb(void) {
88 rgb_matrix_set_suspend_state(true);
89 suspend_power_down_user();
90}
91
92void suspend_wakeup_init_kb(void) {
93 rgb_matrix_set_suspend_state(false);
94 suspend_wakeup_init_user();
95}
96#endif