diff options
Diffstat (limited to 'keyboards/evyd13/atom47/rev5/rev5.c')
| -rw-r--r-- | keyboards/evyd13/atom47/rev5/rev5.c | 153 |
1 files changed, 153 insertions, 0 deletions
diff --git a/keyboards/evyd13/atom47/rev5/rev5.c b/keyboards/evyd13/atom47/rev5/rev5.c new file mode 100644 index 000000000..ea0208706 --- /dev/null +++ b/keyboards/evyd13/atom47/rev5/rev5.c | |||
| @@ -0,0 +1,153 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2021 Evelien Dekkers | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #include "rev5.h" | ||
| 19 | |||
| 20 | const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { | ||
| 21 | /* Refer to IS31 manual for these locations | ||
| 22 | * driver | ||
| 23 | * | R location | ||
| 24 | * | | G location | ||
| 25 | * | | | B location | ||
| 26 | * | | | | */ | ||
| 27 | {0, B_1, C_1, A_1}, | ||
| 28 | {0, B_2, C_2, A_2}, | ||
| 29 | {0, B_3, C_3, A_3}, | ||
| 30 | {0, B_4, C_4, A_4}, | ||
| 31 | {0, B_5, C_5, A_5}, | ||
| 32 | {0, B_6, C_6, A_6}, | ||
| 33 | {0, B_7, C_7, A_7}, | ||
| 34 | {0, B_8, C_8, A_8}, | ||
| 35 | {0, B_9, C_9, A_9}, | ||
| 36 | {0, B_10, C_10, A_10}, | ||
| 37 | {0, B_11, C_11, A_11}, | ||
| 38 | {0, B_12, C_12, A_12}, | ||
| 39 | {0, B_13, C_13, A_13}, | ||
| 40 | |||
| 41 | {0, E_1, F_1, D_1}, | ||
| 42 | {0, E_2, F_2, D_2}, | ||
| 43 | {0, E_3, F_3, D_3}, | ||
| 44 | {0, E_4, F_4, D_4}, | ||
| 45 | {0, E_5, F_5, D_5}, | ||
| 46 | {0, E_6, F_6, D_6}, | ||
| 47 | {0, E_7, F_7, D_7}, | ||
| 48 | {0, E_8, F_8, D_8}, | ||
| 49 | {0, E_9, F_9, D_9}, | ||
| 50 | {0, E_10, F_10, D_10}, | ||
| 51 | {0, E_11, F_11, D_11}, | ||
| 52 | {0, E_13, F_13, D_13}, | ||
| 53 | |||
| 54 | {0, H_1, I_1, G_1}, | ||
| 55 | {0, H_2, I_2, G_2}, | ||
| 56 | {0, H_3, I_3, G_3}, | ||
| 57 | {0, H_4, I_4, G_4}, | ||
| 58 | {0, H_5, I_5, G_5}, | ||
| 59 | {0, H_6, I_6, G_6}, | ||
| 60 | {0, H_7, I_7, G_7}, | ||
| 61 | {0, H_8, I_8, G_8}, | ||
| 62 | {0, H_9, I_9, G_9}, | ||
| 63 | {0, H_10, I_10, G_10}, | ||
| 64 | {0, H_11, I_11, G_11}, | ||
| 65 | {0, H_12, I_12, G_12}, | ||
| 66 | {0, H_13, I_13, G_13}, | ||
| 67 | |||
| 68 | {0, K_1, L_1, J_1}, | ||
| 69 | {0, K_2, L_2, J_2}, | ||
| 70 | {0, K_3, L_3, J_3}, | ||
| 71 | {0, K_4, L_4, J_4}, | ||
| 72 | {0, K_6, L_6, J_6}, | ||
| 73 | {0, K_8, L_8, J_8}, | ||
| 74 | {0, K_10, L_10, J_10}, | ||
| 75 | {0, K_11, L_11, J_11}, | ||
| 76 | {0, K_12, L_12, J_12}, | ||
| 77 | {0, K_13, L_13, J_13} | ||
| 78 | }; | ||
| 79 | |||
| 80 | led_config_t g_led_config = { { | ||
| 81 | // Key Matrix to LED Index | ||
| 82 | { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }, | ||
| 83 | { 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, NO_LED, 24 }, | ||
| 84 | { 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37 }, | ||
| 85 | { 38, 39, 40, 41, NO_LED, 42, NO_LED, 43, NO_LED, 44, 45, 46, 47 } | ||
| 86 | }, { | ||
| 87 | // LED Index to Physical Position | ||
| 88 | { 9, 8 }, | ||
| 89 | { 26, 8 }, | ||
| 90 | { 43, 8 }, | ||
| 91 | { 60, 8 }, | ||
| 92 | { 78, 8 }, | ||
| 93 | { 95, 8 }, | ||
| 94 | { 112, 8 }, | ||
| 95 | { 129, 8 }, | ||
| 96 | { 146, 8 }, | ||
| 97 | { 164, 8 }, | ||
| 98 | { 181, 8 }, | ||
| 99 | { 198, 8 }, | ||
| 100 | { 215, 8 }, | ||
| 101 | |||
| 102 | { 11, 24 }, | ||
| 103 | { 30, 24 }, | ||
| 104 | { 47, 24 }, | ||
| 105 | { 64, 24 }, | ||
| 106 | { 82, 24 }, | ||
| 107 | { 99, 24 }, | ||
| 108 | { 116, 24 }, | ||
| 109 | { 134, 24 }, | ||
| 110 | { 151, 24 }, | ||
| 111 | { 168, 24 }, | ||
| 112 | { 185, 24 }, | ||
| 113 | { 209, 24 }, | ||
| 114 | |||
| 115 | { 15, 40 }, | ||
| 116 | { 20, 22 }, | ||
| 117 | { 39, 40 }, | ||
| 118 | { 56, 40 }, | ||
| 119 | { 73, 40 }, | ||
| 120 | { 90, 40 }, | ||
| 121 | { 108, 40 }, | ||
| 122 | { 125, 40 }, | ||
| 123 | { 142, 40 }, | ||
| 124 | { 159, 40 }, | ||
| 125 | { 177, 40 }, | ||
| 126 | { 196, 40 }, | ||
| 127 | { 215, 40 }, | ||
| 128 | |||
| 129 | { 11, 56 }, | ||
| 130 | { 30, 56 }, | ||
| 131 | { 47, 56 }, | ||
| 132 | { 64, 56 }, | ||
| 133 | { 88, 56 }, | ||
| 134 | { 127, 56 }, | ||
| 135 | { 159, 56 }, | ||
| 136 | { 177, 56 }, | ||
| 137 | { 194, 56 }, | ||
| 138 | { 213, 56 }, | ||
| 139 | }, { | ||
| 140 | // LED Index to Flag | ||
| 141 | 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, | ||
| 142 | 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, | ||
| 143 | 1, 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, | ||
| 144 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 | ||
| 145 | } }; | ||
| 146 | |||
| 147 | void rgb_matrix_indicators_kb(void) { | ||
| 148 | if (host_keyboard_led_state().caps_lock) { | ||
| 149 | rgb_matrix_set_color(26, 255, 255, 255); | ||
| 150 | } else { | ||
| 151 | rgb_matrix_set_color(26, 0, 0, 0); | ||
| 152 | } | ||
| 153 | } | ||
