diff options
Diffstat (limited to 'keyboards/wekey/we27/we27.c')
| -rw-r--r-- | keyboards/wekey/we27/we27.c | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/keyboards/wekey/we27/we27.c b/keyboards/wekey/we27/we27.c new file mode 100644 index 000000000..2765e6f3b --- /dev/null +++ b/keyboards/wekey/we27/we27.c | |||
| @@ -0,0 +1,58 @@ | |||
| 1 | /* Copyright 2021 @wekey | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include "we27.h" | ||
| 18 | #include "encoder_actions.h" | ||
| 19 | |||
| 20 | #ifdef RGB_MATRIX_ENABLE | ||
| 21 | |||
| 22 | #define __ NO_LED | ||
| 23 | |||
| 24 | led_config_t g_led_config = { { | ||
| 25 | { 0, 1, 2, 3, 4 }, | ||
| 26 | { 9, 8, 7, 6, 5 }, | ||
| 27 | { 10, 11, 12, 13, 14 }, | ||
| 28 | { 18, 17, 16, 15, __ }, | ||
| 29 | { 19, 20, 21, 22, 23 }, | ||
| 30 | { 26, 25, __, 24, __ } | ||
| 31 | }, { | ||
| 32 | {0,1},{56,1},{112,1},{168,1},{224,1}, | ||
| 33 | {0,16},{56,16},{112,16},{168,16},{224,16}, | ||
| 34 | {0,28},{56,28},{112,28},{168,28},{224,28}, | ||
| 35 | {0,40},{56,40},{112,40},{168,40}, | ||
| 36 | {0,52},{56,52},{112,52},{168,52},{224,52}, | ||
| 37 | {0,64},{56,64},{168,64} | ||
| 38 | }, { | ||
| 39 | 1, 1, 1, 1, 1, | ||
| 40 | 1, 1, 4, 4, 4, | ||
| 41 | 1, 4, 4, 4, 4, | ||
| 42 | 1, 4, 4, 4, | ||
| 43 | 1, 4, 4, 4, 4, | ||
| 44 | 1, 4, 4 | ||
| 45 | } }; | ||
| 46 | |||
| 47 | #endif | ||
| 48 | |||
| 49 | void matrix_scan_kb(void) { | ||
| 50 | encoder_action_unregister(); | ||
| 51 | matrix_scan_user(); | ||
| 52 | } | ||
| 53 | |||
| 54 | bool encoder_update_kb(uint8_t index, bool clockwise) { | ||
| 55 | if (!encoder_update_user(index, clockwise)) { return false; } | ||
| 56 | encoder_action_register(index, clockwise); | ||
| 57 | return true; | ||
| 58 | }; | ||
