GMMK 2 WBG7 MCU compatibility (#16436)
* GMMK V2 QMK Compatibility * fix problems * Update keyboards/gmmk/gmmk2/config.h Co-authored-by: Drashna Jaelre <drashna@live.com> * Update keyboards/gmmk/gmmk2/config.h Co-authored-by: Drashna Jaelre <drashna@live.com> * Fix a minor problem * Optimize the code * Update config.h * Update * Update config.h * Update keyboards/gmmk/gmmk2/p96/ansi/keymaps/via/config.h Co-authored-by: Drashna Jaelre <drashna@live.com> * Update config.h * Update keyboards/gmmk/gmmk2/p96/iso/keymaps/via/config.h Co-authored-by: Drashna Jaelre <drashna@live.com> * Update config.h * Update keyboards/gmmk/gmmk2/p65/ansi/rules.mk Co-authored-by: Drashna Jaelre <drashna@live.com> * Update keyboards/gmmk/gmmk2/p96/ansi/keymaps/default/keymap.c Co-authored-by: Drashna Jaelre <drashna@live.com> * Update keyboards/gmmk/gmmk2/p96/ansi/keymaps/via/keymap.c Co-authored-by: Drashna Jaelre <drashna@live.com> * Update keyboards/gmmk/gmmk2/p96/ansi/rules.mk Co-authored-by: Drashna Jaelre <drashna@live.com> * Update keyboards/gmmk/gmmk2/p96/iso/rules.mk Co-authored-by: Drashna Jaelre <drashna@live.com> * Update keyboards/gmmk/gmmk2/p65/iso/rules.mk Co-authored-by: Drashna Jaelre <drashna@live.com> * Update config.h * Update config.h * Update config.h * Modify device pid * Add gmmk2_p96 keyboard. * Add gmmk2_p96 keyboard. * Update led matrix. * Update led matrix. * Delete eeprom_flash.c * Update keyboards/gmmk/gmmk2/p96/ansi/rules.mk Co-authored-by: Nick Brassel <nick@tzarc.org> * Update from qmk develop branch * Increased compatibility with wear_leveling. * Update config.h Co-authored-by: Joy <chang.li@westberrytech.com> Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Nick Brassel <nick@tzarc.org>
This commit is contained in:
parent
a768ec265d
commit
bbd6ea977c
332
keyboards/gmmk/gmmk2/p96/ansi/ansi.c
Normal file
332
keyboards/gmmk/gmmk2/p96/ansi/ansi.c
Normal file
@ -0,0 +1,332 @@
|
||||
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com>
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "ansi.h"
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
|
||||
const aw_led g_aw_leds[DRIVER_LED_TOTAL] = {
|
||||
/* Refer to IS31 manual for these locations
|
||||
* driver
|
||||
* | R location
|
||||
* | | G location
|
||||
* | | | B location
|
||||
* | | | | */
|
||||
{0, CS1_SW1, CS2_SW1, CS3_SW1}, // 0, k00, Esc
|
||||
{0, CS1_SW2, CS2_SW2, CS3_SW2}, // 1, k10, F1
|
||||
{0, CS1_SW3, CS2_SW3, CS3_SW3}, // 2, k20, F2
|
||||
{0, CS1_SW4, CS2_SW4, CS3_SW4}, // 3, k30, F3
|
||||
{0, CS1_SW5, CS2_SW5, CS3_SW5}, // 4, k40, F4
|
||||
{0, CS1_SW6, CS2_SW6, CS3_SW6}, // 5, k50, F5
|
||||
{0, CS1_SW7, CS2_SW7, CS3_SW7}, // 6, k60, F6
|
||||
{0, CS1_SW8, CS2_SW8, CS3_SW8}, // 7, k70, F7
|
||||
{0, CS1_SW9, CS2_SW9, CS3_SW9}, // 8, k80, F8
|
||||
{0, CS1_SW10, CS2_SW10, CS3_SW10}, // 9, k90, F9
|
||||
{0, CS1_SW11, CS2_SW11, CS3_SW11}, // 10, ka0, F10
|
||||
{0, CS1_SW12, CS2_SW12, CS3_SW12}, // 11, kb0, F11
|
||||
{1, CS1_SW1, CS2_SW1, CS3_SW1}, // 12, kc0, F12
|
||||
{1, CS4_SW2, CS5_SW2, CS6_SW2}, // 13, kd0, Printscreen
|
||||
{1, CS4_SW3, CS5_SW3, CS6_SW3}, // 14, k06, Delete
|
||||
{1, CS1_SW2, CS2_SW2, CS3_SW2}, // 15, k16, Insert
|
||||
{1, CS4_SW4, CS5_SW4, CS6_SW4}, // 16, k26, Page Up
|
||||
{1, CS4_SW7, CS5_SW7, CS6_SW7}, // 17, k36, Page Down
|
||||
|
||||
{0, CS4_SW1, CS5_SW1, CS6_SW1}, // 18, k01, `
|
||||
{0, CS4_SW2, CS5_SW2, CS6_SW2}, // 19, k11, 1
|
||||
{0, CS4_SW3, CS5_SW3, CS6_SW3}, // 20, k21, 2
|
||||
{0, CS4_SW4, CS5_SW4, CS6_SW4}, // 21, k31, 3
|
||||
{0, CS4_SW5, CS5_SW5, CS6_SW5}, // 22, k41, 4
|
||||
{0, CS4_SW6, CS5_SW6, CS6_SW6}, // 23, k51, 5
|
||||
{0, CS4_SW7, CS5_SW7, CS6_SW7}, // 24, k61, 6
|
||||
{0, CS4_SW8, CS5_SW8, CS6_SW8}, // 25, k71, 7
|
||||
{0, CS4_SW9, CS5_SW9, CS6_SW9}, // 26, k81, 8
|
||||
{0, CS4_SW10, CS5_SW10, CS6_SW10}, // 27, k91, 9
|
||||
{0, CS4_SW11, CS5_SW11, CS6_SW11}, // 28, ka1, 0
|
||||
{0, CS4_SW12, CS5_SW12, CS6_SW12}, // 29, kb1, -
|
||||
{1, CS1_SW5, CS2_SW5, CS3_SW5}, // 30, kc1, =
|
||||
{1, CS1_SW7, CS2_SW7, CS3_SW7}, // 31, kd1, Backspace
|
||||
{1, CS7_SW1, CS8_SW1, CS9_SW1}, // 32, k46, Num Lock
|
||||
{1, CS7_SW2, CS8_SW2, CS9_SW2}, // 33, k56, Num /
|
||||
{1, CS7_SW3, CS8_SW3, CS9_SW3}, // 34, k66, Num *
|
||||
{1, CS7_SW4, CS8_SW4, CS9_SW4}, // 35, k76, Num -
|
||||
|
||||
{0, CS7_SW1, CS8_SW1, CS9_SW1}, // 36, k02, Tab
|
||||
{0, CS7_SW2, CS8_SW2, CS9_SW2}, // 37, k12, Q
|
||||
{0, CS7_SW3, CS8_SW3, CS9_SW3}, // 38, k22, W
|
||||
{0, CS7_SW4, CS8_SW4, CS9_SW4}, // 39, k32, E
|
||||
{0, CS7_SW5, CS8_SW5, CS9_SW5}, // 40, k42, R
|
||||
{0, CS7_SW6, CS8_SW6, CS9_SW6}, // 41, k52, T
|
||||
{0, CS7_SW7, CS8_SW7, CS9_SW7}, // 42, k62, Y
|
||||
{0, CS7_SW8, CS8_SW8, CS9_SW8}, // 43, k72, U
|
||||
{0, CS7_SW9, CS8_SW9, CS9_SW9}, // 44, k82, I
|
||||
{0, CS7_SW10, CS8_SW10, CS9_SW10}, // 45, k92, O
|
||||
{0, CS7_SW11, CS8_SW11, CS9_SW11}, // 46, ka2, P
|
||||
{0, CS7_SW12, CS8_SW12, CS9_SW12}, // 47, kb2, [
|
||||
{1, CS1_SW8, CS2_SW8, CS3_SW8}, // 48, kc2, ]
|
||||
{1, CS1_SW9, CS2_SW9, CS3_SW9}, // 49, kd3, "\\"
|
||||
{1, CS7_SW5, CS8_SW5, CS9_SW5}, // 50, k86, Num 7
|
||||
{1, CS7_SW6, CS8_SW6, CS9_SW6}, // 51, k96, Num 8
|
||||
{1, CS7_SW7, CS8_SW7, CS9_SW7}, // 52, ka6, Num 9
|
||||
{1, CS7_SW8, CS8_SW8, CS9_SW8}, // 53, kb6, Num +
|
||||
|
||||
{0, CS10_SW1, CS11_SW1, CS12_SW1}, // 54, k03, Caps Lock
|
||||
{0, CS10_SW2, CS11_SW2, CS12_SW2}, // 55, k13, A
|
||||
{0, CS10_SW3, CS11_SW3, CS12_SW3}, // 56, k23, S
|
||||
{0, CS10_SW4, CS11_SW4, CS12_SW4}, // 57, k33, D
|
||||
{0, CS10_SW5, CS11_SW5, CS12_SW5}, // 58, k43, F
|
||||
{0, CS10_SW6, CS11_SW6, CS12_SW6}, // 59, k53, G
|
||||
{0, CS10_SW7, CS11_SW7, CS12_SW7}, // 60, k63, H
|
||||
{0, CS10_SW8, CS11_SW8, CS12_SW8}, // 61, k73, J
|
||||
{0, CS10_SW9, CS11_SW9, CS12_SW9}, // 62, k83, K
|
||||
{0, CS10_SW10, CS11_SW10, CS12_SW10}, // 63, k93, L
|
||||
{0, CS10_SW11, CS11_SW11, CS12_SW11}, // 64, ka3, ;
|
||||
{0, CS10_SW12, CS11_SW12, CS12_SW12}, // 65, kb3, '
|
||||
{1, CS1_SW11, CS2_SW11, CS3_SW11}, // 66, kc3, Enter
|
||||
{1, CS7_SW9, CS8_SW9, CS9_SW9}, // 67, ka7, Num 4
|
||||
{1, CS7_SW10, CS8_SW10, CS9_SW10}, // 68, kb7, Num 5
|
||||
{1, CS7_SW11, CS8_SW11, CS9_SW11}, // 69, kc7, Num 6
|
||||
|
||||
{0, CS13_SW1, CS14_SW1, CS15_SW1}, // 70, k04, Shift_L
|
||||
{0, CS13_SW2, CS14_SW2, CS15_SW2}, // 71, k24, Z
|
||||
{0, CS13_SW3, CS14_SW3, CS15_SW3}, // 72, k34, X
|
||||
{0, CS13_SW4, CS14_SW4, CS15_SW4}, // 73, k44, C
|
||||
{0, CS13_SW5, CS14_SW5, CS15_SW5}, // 74, k54, V
|
||||
{0, CS13_SW6, CS14_SW6, CS15_SW6}, // 75, k64, B
|
||||
{0, CS13_SW7, CS14_SW7, CS15_SW7}, // 76, k74, N
|
||||
{0, CS13_SW8, CS14_SW8, CS15_SW8}, // 77, k84, M
|
||||
{0, CS13_SW9, CS14_SW9, CS15_SW9}, // 78, k94, ,
|
||||
{0, CS13_SW10, CS14_SW10, CS15_SW10}, // 79, ka4, .
|
||||
{0, CS13_SW11, CS14_SW11, CS15_SW11}, // 80, kb4, /
|
||||
{1, CS4_SW8, CS5_SW8, CS6_SW8}, // 81, kd4, Shift_R
|
||||
{1, CS4_SW9, CS5_SW9, CS6_SW9}, // 82, k17, Up
|
||||
{1, CS10_SW1, CS11_SW1, CS12_SW1}, // 83, k67, Num 1
|
||||
{1, CS10_SW2, CS11_SW2, CS12_SW2}, // 84, k77, Num 2
|
||||
{1, CS10_SW3, CS11_SW3, CS12_SW3}, // 85, k87, Num 3
|
||||
{1, CS10_SW4, CS11_SW4, CS12_SW4}, // 86, k97, Enter_R
|
||||
|
||||
{0, CS16_SW1, CS17_SW1, CS18_SW1}, // 87, k05, Ctrl_L
|
||||
{0, CS16_SW2, CS17_SW2, CS18_SW2}, // 88, k15, Win_L
|
||||
{0, CS16_SW3, CS17_SW3, CS18_SW3}, // 89, k25, Alt_L
|
||||
{0, CS16_SW6, CS17_SW6, CS18_SW6}, // 90, k65, Space
|
||||
{0, CS16_SW9, CS17_SW9, CS18_SW9}, // 91, k95, Alt_R
|
||||
{0, CS16_SW10, CS17_SW10, CS18_SW10}, // 92, ka5, FN
|
||||
{0, CS16_SW12, CS17_SW12, CS18_SW12}, // 93, kc5, Ctrl_R
|
||||
{1, CS4_SW10, CS5_SW10, CS6_SW10}, // 94, k07, Left
|
||||
{1, CS4_SW11, CS5_SW11, CS6_SW11}, // 95, k27, Down
|
||||
{1, CS10_SW5, CS11_SW5, CS12_SW5}, // 96, k37, Right
|
||||
{1, CS10_SW6, CS11_SW6, CS12_SW6}, // 97, k47, Num 0
|
||||
{1, CS10_SW7, CS11_SW7, CS12_SW7}, // 98, k57, Num .
|
||||
|
||||
{1, CS13_SW1, CS14_SW1, CS15_SW1}, // 101, LED 1
|
||||
{1, CS13_SW2, CS14_SW2, CS15_SW2}, // 102, LED 2
|
||||
{1, CS13_SW3, CS14_SW3, CS15_SW3}, // 103, LED 3
|
||||
{1, CS13_SW4, CS14_SW4, CS15_SW4}, // 104, LED 4
|
||||
{1, CS13_SW5, CS14_SW5, CS15_SW5}, // 105, LED 5
|
||||
{1, CS13_SW6, CS14_SW6, CS15_SW6}, // 106, LED 6
|
||||
{1, CS13_SW7, CS14_SW7, CS15_SW7}, // 107, LED 7
|
||||
{1, CS13_SW8, CS14_SW8, CS15_SW8}, // 108, LED 8
|
||||
{1, CS13_SW9, CS14_SW9, CS15_SW9}, // 109, LED 9
|
||||
{1, CS13_SW10, CS14_SW10, CS15_SW10}, // 110, LED 10
|
||||
{1, CS16_SW1, CS17_SW1, CS18_SW1}, // 111, LED 11
|
||||
{1, CS16_SW2, CS17_SW2, CS18_SW2}, // 112, LED 12
|
||||
{1, CS16_SW3, CS17_SW3, CS18_SW3}, // 113, LED 13
|
||||
{1, CS16_SW4, CS17_SW4, CS18_SW4}, // 114, LED 14
|
||||
{1, CS16_SW5, CS17_SW5, CS18_SW5}, // 115, LED 15
|
||||
{1, CS16_SW6, CS17_SW6, CS18_SW6}, // 116, LED 16
|
||||
{1, CS16_SW7, CS17_SW7, CS18_SW7}, // 117, LED 17
|
||||
{1, CS16_SW8, CS17_SW8, CS18_SW8}, // 118, LED 18
|
||||
{1, CS16_SW9, CS17_SW9, CS18_SW9}, // 119, LED 19
|
||||
{1, CS16_SW10, CS17_SW10, CS18_SW10} // 120, LED 20
|
||||
};
|
||||
|
||||
#define __ NO_LED
|
||||
|
||||
led_config_t g_led_config = {{
|
||||
{ 0, 18, 36, 54, 70, 87, 14, 94},
|
||||
{ 1, 19, 37, 55, __, 88, 15, 82},
|
||||
{ 2, 20, 38, 56, 71, 89, 16, 95},
|
||||
{ 3, 21, 39, 57, 72, __, 17, 96},
|
||||
{ 4, 22, 40, 58, 73, __, 32, 97},
|
||||
{ 5, 23, 41, 59, 74, __, 33, 98},
|
||||
{ 6, 24, 42, 60, 75, 90, 34, 83},
|
||||
{ 7, 25, 43, 61, 76, __, 35, 84},
|
||||
{ 8, 26, 44, 62, 77, __, 50, 85},
|
||||
{ 9, 27, 45, 63, 78, 91, 51, 86},
|
||||
{10, 28, 46, 64, 79, 92, 52, 67},
|
||||
{11, 29, 47, 65, 80, __, 53, 68},
|
||||
{12, 30, 48, __, __, 93, __, 69},
|
||||
{13, 31, 49, 66, 81, __, __, __}
|
||||
}, {
|
||||
{ 11, 0}, // 0, k00, Esc
|
||||
{ 22, 0}, // 1, k10, F1
|
||||
{ 33, 0}, // 2, k20, F2
|
||||
{ 44, 0}, // 3, k30, F3
|
||||
{ 55, 0}, // 4, k40, F4
|
||||
{ 66, 0}, // 5, k50, F5
|
||||
{ 77, 0}, // 6, k60, F6
|
||||
{ 88, 0}, // 7, k70, F7
|
||||
{ 99, 0}, // 8, k80, F8
|
||||
{ 110, 0}, // 9, k90, F9
|
||||
{ 121, 0}, // 10, ka0, F10
|
||||
{ 132, 0}, // 11, kb0, F11
|
||||
{ 143, 0}, // 12, kc0, F12
|
||||
{ 154, 0}, // 13, kd0, Printscreen
|
||||
{ 165, 0}, // 14, k06, Delete
|
||||
{ 176, 0}, // 15, k16, Insert
|
||||
{ 187, 0}, // 16, k26, Page Up
|
||||
{ 198, 0}, // 17, k36, Page Down
|
||||
|
||||
{ 11, 11}, // 18, k01, `
|
||||
{ 22, 11}, // 19, k11, 1
|
||||
{ 33, 11}, // 20, k21, 2
|
||||
{ 44, 11}, // 21, k31, 3
|
||||
{ 55, 11}, // 22, k41, 4
|
||||
{ 66, 11}, // 23, k51, 5
|
||||
{ 77, 11}, // 24, k61, 6
|
||||
{ 88, 11}, // 25, k71, 7
|
||||
{ 99, 11}, // 26, k81, 8
|
||||
{ 110, 11}, // 27, k91, 9
|
||||
{ 121, 11}, // 28, ka1, 0
|
||||
{ 132, 11}, // 29, kb1, -
|
||||
{ 143, 11}, // 30, kc1, =
|
||||
{ 154, 11}, // 31, kd1, Backspace
|
||||
{ 165, 11}, // 32, k46, Num Lock
|
||||
{ 176, 11}, // 33, k56, Num /
|
||||
{ 187, 11}, // 34, k66, Num *
|
||||
{ 198, 11}, // 35, k76, Num -
|
||||
|
||||
{ 11, 22}, // 36, k02, Tab
|
||||
{ 22, 22}, // 37, k12, Q
|
||||
{ 33, 22}, // 38, k22, W
|
||||
{ 44, 22}, // 39, k32, E
|
||||
{ 55, 22}, // 40, k42, R
|
||||
{ 66, 22}, // 41, k52, T
|
||||
{ 77, 22}, // 42, k62, Y
|
||||
{ 88, 22}, // 43, k72, U
|
||||
{ 99, 22}, // 44, k82, I
|
||||
{ 110, 22}, // 45, k92, O
|
||||
{ 121, 22}, // 46, ka2, P
|
||||
{ 132, 22}, // 47, kb2, [
|
||||
{ 143, 22}, // 48, kc2, ]
|
||||
{ 154, 22}, // 49, kd3, "\\"
|
||||
{ 165, 22}, // 50, k86, Num 7
|
||||
{ 176, 22}, // 51, k96, Num 8
|
||||
{ 187, 22}, // 52, ka6, Num 9
|
||||
{ 198, 22}, // 53, kb6, Num +
|
||||
|
||||
{ 11, 33}, // 54, k03, Caps Lock
|
||||
{ 22, 33}, // 55, k13, A
|
||||
{ 33, 33}, // 56, k23, S
|
||||
{ 44, 33}, // 57, k33, D
|
||||
{ 55, 33}, // 58, k43, F
|
||||
{ 66, 33}, // 59, k53, G
|
||||
{ 77, 33}, // 60, k63, H
|
||||
{ 88, 33}, // 61, k73, J
|
||||
{ 99, 33}, // 62, k83, K
|
||||
{ 110, 33}, // 63, k93, L
|
||||
{ 121, 33}, // 64, ka3, ;
|
||||
{ 132, 33}, // 65, kb3, '
|
||||
{ 154, 33}, // 66, kc3, Enter
|
||||
{ 165, 33}, // 67, ka7, Num 4
|
||||
{ 176, 33}, // 68, kb7, Num 5
|
||||
{ 187, 33}, // 69, kc7, Num 6
|
||||
|
||||
{ 11, 44}, // 70, k04, Shift_L
|
||||
{ 33, 44}, // 71, k24, Z
|
||||
{ 44, 44}, // 72, k34, X
|
||||
{ 55, 44}, // 73, k44, C
|
||||
{ 66, 44}, // 74, k54, V
|
||||
{ 77, 44}, // 75, k64, B
|
||||
{ 88, 44}, // 76, k74, N
|
||||
{ 99, 44}, // 77, k84, M
|
||||
{ 110, 44}, // 78, k94, ,
|
||||
{ 121, 44}, // 79, ka4, .
|
||||
{ 132, 44}, // 80, kb4, /
|
||||
{ 143, 44}, // 81, kd4, Shift_R
|
||||
{ 154, 44}, // 82, k17, Up
|
||||
{ 165, 44}, // 83, k67, Num 1
|
||||
{ 176, 44}, // 84, k77, Num 2
|
||||
{ 187, 44}, // 85, k87, Num 3
|
||||
{ 198, 44}, // 86, k97, Enter_R
|
||||
|
||||
{ 11, 55}, // 87, k05, Ctrl_L
|
||||
{ 22, 55}, // 88, k15, Win_L
|
||||
{ 33, 55}, // 89, k25, Alt_L
|
||||
{ 77, 55}, // 90, k65, Space
|
||||
{ 110, 55}, // 91, k95, Alt_R
|
||||
{ 121, 55}, // 92, ka5, FN
|
||||
{ 132, 55}, // 93, kc5, Ctrl_R
|
||||
{ 143, 55}, // 94, k07, Left
|
||||
{ 154, 55}, // 95, k27, Down
|
||||
{ 165, 55}, // 96, k37, Right
|
||||
{ 176, 55}, // 97, k47, Num 0
|
||||
{ 187, 55}, // 98, k57, Num .
|
||||
|
||||
{ 0, 0}, // 101, LED 1
|
||||
{ 0, 6}, // 102, LED 2
|
||||
{ 0, 12}, // 103, LED 3
|
||||
{ 0, 18}, // 104, LED 4
|
||||
{ 0, 24}, // 105, LED 5
|
||||
{ 0, 30}, // 106, LED 6
|
||||
{ 0, 36}, // 107, LED 7
|
||||
{ 0, 42}, // 108, LED 8
|
||||
{ 0, 48}, // 109, LED 9
|
||||
{ 0, 54}, // 110, LED 10
|
||||
{ 209, 0}, // 111, LED 11
|
||||
{ 209, 6}, // 112, LED 12
|
||||
{ 209, 12}, // 113, LED 13
|
||||
{ 209, 18}, // 114, LED 14
|
||||
{ 209, 24}, // 115, LED 15
|
||||
{ 209, 30}, // 116, LED 16
|
||||
{ 209, 36}, // 117, LED 17
|
||||
{ 209, 42}, // 118, LED 18
|
||||
{ 209, 48}, // 119, LED 19
|
||||
{ 209, 54} // 120, LED 20
|
||||
}, {
|
||||
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4,
|
||||
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2
|
||||
} };
|
||||
#endif
|
||||
|
||||
#ifdef EEPROM_ENABLE
|
||||
|
||||
#include "spi_master.h"
|
||||
|
||||
void spi_init(void) {
|
||||
static bool is_initialised = false;
|
||||
if (!is_initialised) {
|
||||
is_initialised = true;
|
||||
|
||||
// Try releasing special pins for a short time
|
||||
setPinInput(SPI_SCK_PIN);
|
||||
setPinInput(SPI_MOSI_PIN);
|
||||
setPinInput(SPI_MISO_PIN);
|
||||
|
||||
chThdSleepMilliseconds(10);
|
||||
|
||||
palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_ALTERNATE(SPI_SCK_PAL_MODE) | PAL_OUTPUT_TYPE_PUSHPULL | PAL_OUTPUT_SPEED_HIGHEST | PAL_WB32_CURRENT_LEVEL3);
|
||||
palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_ALTERNATE(SPI_MOSI_PAL_MODE) | PAL_OUTPUT_TYPE_PUSHPULL | PAL_OUTPUT_SPEED_HIGHEST);
|
||||
palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_ALTERNATE(SPI_MISO_PAL_MODE) | PAL_OUTPUT_TYPE_PUSHPULL | PAL_OUTPUT_SPEED_HIGHEST);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
54
keyboards/gmmk/gmmk2/p96/ansi/ansi.h
Normal file
54
keyboards/gmmk/gmmk2/p96/ansi/ansi.h
Normal file
@ -0,0 +1,54 @@
|
||||
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com>
|
||||
*
|
||||
* 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"
|
||||
|
||||
#define ___ KC_NO
|
||||
|
||||
// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Del Ins PgUp PgDn
|
||||
// ` 1 2 3 4 5 6 7 8 9 0 - = BSpc Num / * -
|
||||
// Tab Q W E R T Y U I O P [ ] \\ 7 8 9 +
|
||||
// Caps A S D F G H J K L ; ' Enter 4 5 6 +
|
||||
// Sh_L Z X C V B N M , . / Sh_R Up 1 2 3 Enter
|
||||
// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right 0 . Enter
|
||||
|
||||
// clang-format off
|
||||
#define LAYOUT( \
|
||||
k00, k10, k20, k30, k40, k50, k60, k70, k80, k90, ka0, kb0, kc0, kd0, k06, k16, k26, k36,\
|
||||
k01, k11, k21, k31, k41, k51, k61, k71, k81, k91, ka1, kb1, kc1, kd1, k46, k56, k66, k76,\
|
||||
k02, k12, k22, k32, k42, k52, k62, k72, k82, k92, ka2, kb2, kc2, kd2, k86, k96, ka6, kb6,\
|
||||
k03, k13, k23, k33, k43, k53, k63, k73, k83, k93, ka3, kb3, kd3, ka7, kb7, kc7, \
|
||||
k04, k24, k34, k44, k54, k64, k74, k84, k94, ka4, kb4, kd4, k17, k67, k77, k87, k97,\
|
||||
k05, k15, k25, k65, k95, ka5, kc5, k07, k27, k37, k47, k57 \
|
||||
)\
|
||||
{\
|
||||
{ k00, k01, k02, k03, k04, k05, k06, k07},\
|
||||
{ k10, k11, k12, k13, ___, k15, k16, k17},\
|
||||
{ k20, k21, k22, k23, k24, k25, k26, k27},\
|
||||
{ k30, k31, k32, k33, k34, ___, k36, k37},\
|
||||
{ k40, k41, k42, k43, k44, ___, k46, k47},\
|
||||
{ k50, k51, k52, k53, k54, ___, k56, k57},\
|
||||
{ k60, k61, k62, k63, k64, k65, k66, k67},\
|
||||
{ k70, k71, k72, k73, k74, ___, k76, k77},\
|
||||
{ k80, k81, k82, k83, k84, ___, k86, k87},\
|
||||
{ k90, k91, k92, k93, k94, k95, k96, k97},\
|
||||
{ ka0, ka1, ka2, ka3, ka4, ka5, ka6, ka7},\
|
||||
{ kb0, kb1, kb2, kb3, kb4, ___, kb6, kb7},\
|
||||
{ kc0, kc1, kc2, ___, ___, kc5, ___, kc7},\
|
||||
{ kd0, kd1, kd2, kd3, kd4, ___, ___, ___} \
|
||||
}
|
21
keyboards/gmmk/gmmk2/p96/ansi/config.h
Normal file
21
keyboards/gmmk/gmmk2/p96/ansi/config.h
Normal file
@ -0,0 +1,21 @@
|
||||
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com>
|
||||
*
|
||||
* 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 "config_common.h"
|
||||
|
||||
#define PRODUCT_ID 0x504B
|
119
keyboards/gmmk/gmmk2/p96/ansi/info.json
Normal file
119
keyboards/gmmk/gmmk2/p96/ansi/info.json
Normal file
@ -0,0 +1,119 @@
|
||||
{
|
||||
"keyboard_name": "GMMK V2 96 ANSI",
|
||||
"url": "http://www.pcgamingrace.com",
|
||||
"maintainer": "GloriousThrall",
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{ "label": "ESC", "x": 0, "y": 0 },
|
||||
|
||||
{ "label": "F1", "x": 1.25, "y": 0 },
|
||||
{ "label": "F2", "x": 2.25, "y": 0 },
|
||||
{ "label": "F3", "x": 3.25, "y": 0 },
|
||||
{ "label": "F4", "x": 4.25, "y": 0 },
|
||||
|
||||
{ "label": "F5", "x": 5.5, "y": 0 },
|
||||
{ "label": "F6", "x": 6.5, "y": 0 },
|
||||
{ "label": "F7", "x": 7.5, "y": 0 },
|
||||
{ "label": "F8", "x": 8.5, "y": 0 },
|
||||
|
||||
{ "label": "F9", "x": 9.75, "y": 0 },
|
||||
{ "label": "F10", "x": 10.75, "y": 0 },
|
||||
{ "label": "F11", "x": 11.75, "y": 0 },
|
||||
{ "label": "F12", "x": 12.75, "y": 0 },
|
||||
|
||||
{ "label": "Printscreen", "x": 14, "y": 0 },
|
||||
{ "label": "Delete", "x": 15.5, "y": 0 },
|
||||
{ "label": "Insert", "x": 16.5, "y": 0 },
|
||||
{ "label": "Page Up", "x": 17.5, "y": 0 },
|
||||
{ "label": "Page Down", "x": 18.5, "y": 0 },
|
||||
|
||||
{ "label": "`", "x": 0, "y": 1 },
|
||||
{ "label": "1", "x": 1, "y": 1 },
|
||||
{ "label": "2", "x": 2, "y": 1 },
|
||||
{ "label": "3", "x": 3, "y": 1 },
|
||||
{ "label": "4", "x": 4, "y": 1 },
|
||||
{ "label": "5", "x": 5, "y": 1 },
|
||||
{ "label": "6", "x": 6, "y": 1 },
|
||||
{ "label": "7", "x": 7, "y": 1 },
|
||||
{ "label": "8", "x": 8, "y": 1 },
|
||||
{ "label": "9", "x": 9, "y": 1 },
|
||||
{ "label": "0", "x": 10, "y": 1 },
|
||||
{ "label": "-", "x": 11, "y": 1 },
|
||||
{ "label": "=", "x": 12, "y": 1 },
|
||||
{ "label": "Backspace", "x": 13, "y": 1, "w": 2},
|
||||
{ "label": "Num Lock", "x": 15.5, "y": 1 },
|
||||
{ "label": "/", "x": 16.5, "y": 1 },
|
||||
{ "label": "*", "x": 17.5, "y": 1 },
|
||||
{ "label": "-", "x": 18.5, "y": 1 },
|
||||
|
||||
{ "label": "Tab", "x": 0, "y": 2, "w": 1.5},
|
||||
{ "label": "Q", "x": 1.5, "y": 2 },
|
||||
{ "label": "W", "x": 2.5, "y": 2 },
|
||||
{ "label": "E", "x": 3.5, "y": 2 },
|
||||
{ "label": "R", "x": 4.5, "y": 2 },
|
||||
{ "label": "T", "x": 5.5, "y": 2 },
|
||||
{ "label": "Y", "x": 6.5, "y": 2 },
|
||||
{ "label": "U", "x": 7.5, "y": 2 },
|
||||
{ "label": "I", "x": 8.5, "y": 2 },
|
||||
{ "label": "O", "x": 9.5, "y": 2 },
|
||||
{ "label": "P", "x": 10.5, "y": 2 },
|
||||
{ "label": "[", "x": 11.5, "y": 2 },
|
||||
{ "label": "]", "x": 12.5, "y": 2 },
|
||||
{ "label": "\\", "x": 13.5, "y": 2 , "w": 1.25},
|
||||
{ "label": "7", "x": 15.5, "y": 2 },
|
||||
{ "label": "8", "x": 16.5, "y": 2 },
|
||||
{ "label": "9", "x": 17.5, "y": 2, "w": 1.5},
|
||||
{ "label": "+", "x": 18.5, "y": 2 ,"h":2},
|
||||
|
||||
{ "label": "Caps Lock", "x": 0, "y": 3, "w": 1.75},
|
||||
{ "label": "A", "x": 1.75, "y": 3 },
|
||||
{ "label": "S", "x": 2.75, "y": 3 },
|
||||
{ "label": "D", "x": 3.75, "y": 3 },
|
||||
{ "label": "F", "x": 4.75, "y": 3 },
|
||||
{ "label": "G", "x": 5.75, "y": 3 },
|
||||
{ "label": "H", "x": 6.75, "y": 3 },
|
||||
{ "label": "J", "x": 7.75, "y": 3 },
|
||||
{ "label": "K", "x": 8.75, "y": 3 },
|
||||
{ "label": "L", "x": 9.75, "y": 3 },
|
||||
{ "label": ";", "x": 10.75, "y": 3 },
|
||||
{ "label": "'", "x": 11.75, "y": 3 },
|
||||
{ "label": "Enter", "x": 12.75, "y": 3, "w": 2.25 },
|
||||
{ "label": "4", "x": 15.5, "y": 3 },
|
||||
{ "label": "5", "x": 16.5, "y": 3 },
|
||||
{ "label": "6", "x": 17.5, "y": 3 },
|
||||
|
||||
{ "label": "Shift", "x": 0, "y": 4, "w": 2.25},
|
||||
{ "label": "Z", "x": 2.25, "y": 4 },
|
||||
{ "label": "X", "x": 3.25, "y": 4 },
|
||||
{ "label": "C", "x": 4.25, "y": 4 },
|
||||
{ "label": "V", "x": 5.25, "y": 4 },
|
||||
{ "label": "B", "x": 6.25, "y": 4 },
|
||||
{ "label": "N", "x": 7.25, "y": 4 },
|
||||
{ "label": "M", "x": 8.25, "y": 4 },
|
||||
{ "label": ",", "x": 9.25, "y": 4 },
|
||||
{ "label": ".", "x": 10.25, "y": 4 },
|
||||
{ "label": "/", "x": 11.25, "y": 4 },
|
||||
{ "label": "Shift", "x": 12.25, "y": 4, "w": 1.75},
|
||||
{ "label": "Up", "x": 14.25, "y": 4 },
|
||||
{ "label": "1", "x": 15.5, "y": 4 },
|
||||
{ "label": "2", "x": 16.5, "y": 4 },
|
||||
{ "label": "3", "x": 17.5, "y": 4 },
|
||||
{ "label": "Enter", "x": 18.5, "y": 4 ,"h":2},
|
||||
|
||||
{ "label": "Ctrl", "x": 0, "y": 5, "w": 1.25},
|
||||
{ "label": "Win", "x": 1.25, "y": 5, "w": 1.25},
|
||||
{ "label": "Alt", "x": 2.5, "y": 5, "w": 1.25},
|
||||
{ "label": "Space", "x": 3.75, "y": 5, "w": 6.25},
|
||||
{ "label": "Alt", "x": 10, "y": 5 },
|
||||
{ "label": "FN", "x": 11, "y": 5 },
|
||||
{ "label": "Ctrl", "x": 12, "y": 5 },
|
||||
{ "label": "Left", "x": 13.25, "y": 5 },
|
||||
{ "label": "Down", "x": 14.25, "y": 5 },
|
||||
{ "label": "Right", "x": 15.25, "y": 5 },
|
||||
{ "label": "0", "x": 16.5, "y": 5 },
|
||||
{ "label": ".", "x": 17.5, "y": 5 }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
46
keyboards/gmmk/gmmk2/p96/ansi/keymaps/default/keymap.c
Normal file
46
keyboards/gmmk/gmmk2/p96/ansi/keymaps/default/keymap.c
Normal file
@ -0,0 +1,46 @@
|
||||
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com>
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
enum custom_layers {
|
||||
_BL,
|
||||
_FL,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap _BL: Base Layer (Default Layer)
|
||||
*/
|
||||
[_BL] = LAYOUT(
|
||||
KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_DEL, KC_INS, KC_PGUP, KC_PGDN,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT),
|
||||
|
||||
/* Keymap _FL: Function Layer
|
||||
*/
|
||||
[_FL] = LAYOUT(
|
||||
RESET, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MRWD, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLU, KC_VOLD, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, RGB_HUI, RGB_HUD, RGB_SPD, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, _______, _______, _______,
|
||||
_______, UC_M_WI, _______, _______, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_MOD, _______, _______)
|
||||
};
|
1
keyboards/gmmk/gmmk2/p96/ansi/keymaps/default/readme.md
Normal file
1
keyboards/gmmk/gmmk2/p96/ansi/keymaps/default/readme.md
Normal file
@ -0,0 +1 @@
|
||||
# ANSI GMMKV2 96% Layout
|
22
keyboards/gmmk/gmmk2/p96/ansi/keymaps/via/config.h
Normal file
22
keyboards/gmmk/gmmk2/p96/ansi/keymaps/via/config.h
Normal file
@ -0,0 +1,22 @@
|
||||
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com>
|
||||
*
|
||||
* 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 "config_common.h"
|
||||
|
||||
#define DYNAMIC_KEYMAP_LAYER_COUNT 3
|
||||
#define STM32_USB_USE_OTG1 TRUE
|
53
keyboards/gmmk/gmmk2/p96/ansi/keymaps/via/keymap.c
Normal file
53
keyboards/gmmk/gmmk2/p96/ansi/keymaps/via/keymap.c
Normal file
@ -0,0 +1,53 @@
|
||||
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com>
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
enum custom_layers {
|
||||
_BL,
|
||||
_FL,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap _BL: Base Layer (Default Layer)
|
||||
*/
|
||||
[_BL] = LAYOUT(
|
||||
KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_DEL, KC_INS, KC_PGUP, KC_PGDN,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT),
|
||||
|
||||
/* Keymap _FL: Function Layer
|
||||
*/
|
||||
[_FL] = LAYOUT(
|
||||
RESET, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MRWD, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLU, KC_VOLD, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, RGB_HUI, RGB_HUD, RGB_SPD, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, _______, _______, _______,
|
||||
_______, UC_M_WI, _______, _______, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_MOD, _______, _______),
|
||||
[2] = LAYOUT(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______)
|
||||
};
|
1
keyboards/gmmk/gmmk2/p96/ansi/keymaps/via/rules.mk
Normal file
1
keyboards/gmmk/gmmk2/p96/ansi/keymaps/via/rules.mk
Normal file
@ -0,0 +1 @@
|
||||
VIA_ENABLE = yes
|
23
keyboards/gmmk/gmmk2/p96/ansi/readme.md
Normal file
23
keyboards/gmmk/gmmk2/p96/ansi/readme.md
Normal file
@ -0,0 +1,23 @@
|
||||
# GMMK V2 96% (ANSI)
|
||||
|
||||
A keyboard made and sold by Glorious LLC. Equipped with the WestBerry G7 ARM Cortex-M4 microcontroller
|
||||
|
||||
* Keyboard Maintainer: [GloriousThrall](https://github.com/GloriousThrall)
|
||||
* Hardware Supported: GMMK V2
|
||||
* Hardware Availability: [GloriousPCGaming.com](https://www.pcgamingrace.com)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make gmmk/gmmk2/p96/ansi:default
|
||||
|
||||
Flashing example for this keyboard:
|
||||
|
||||
make gmmk/gmmk2/p96/ansi:default:flash
|
||||
|
||||
To reset the board into bootloader mode, do one of the following:
|
||||
|
||||
* Hold the Reset switch mounted on the surface of the PCB while connecting the USB cable (remove the spacebar key and press and hold the pin on the right side)
|
||||
* Hold the Escape key while connecting the USB cable (also erases persistent settings)
|
||||
* Fn+Backslash will reset the board to bootloader mode if you have flashed the default QMK keymap
|
||||
|
||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
22
keyboards/gmmk/gmmk2/p96/ansi/rules.mk
Normal file
22
keyboards/gmmk/gmmk2/p96/ansi/rules.mk
Normal file
@ -0,0 +1,22 @@
|
||||
# MCU name
|
||||
MCU = WB32F3G71
|
||||
|
||||
# Bootloader selection
|
||||
BOOTLOADER = wb32-dfu
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite.
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys.
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control.
|
||||
CONSOLE_ENABLE = no # Console for debug.
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration.
|
||||
NKRO_ENABLE = yes # Enable NKRO Rollover.
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality.
|
||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow.
|
||||
AUDIO_ENABLE = no # Audio output.
|
||||
RGB_MATRIX_ENABLE = yes # Enable RGB matrix effects.
|
||||
RGB_MATRIX_DRIVER = AW20216 # Enable RGB matrix effects.
|
||||
EEPROM_DRIVER = wear_leveling
|
||||
WEAR_LEVELING_DRIVER = spi_flash
|
130
keyboards/gmmk/gmmk2/p96/config.h
Normal file
130
keyboards/gmmk/gmmk2/p96/config.h
Normal file
@ -0,0 +1,130 @@
|
||||
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com>
|
||||
*
|
||||
* 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 "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define DEVICE_VER 0x0001
|
||||
#define VENDOR_ID 0x320F
|
||||
#define MANUFACTURER Glorious
|
||||
|
||||
#define PRODUCT GMMK 2 96
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 14
|
||||
#define MATRIX_COLS 8
|
||||
|
||||
#define MATRIX_ROW_PINS \
|
||||
{ B0, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13 }
|
||||
#define MATRIX_COL_PINS \
|
||||
{ A0, A1, A2, A3, A4, A8, A9, A10 }
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* Hold ESC on start up to clear EEPROM and boot into bootloader mode */
|
||||
#define BOOTMAGIC_LITE_ROW 0
|
||||
#define BOOTMAGIC_LITE_COLUMN 0
|
||||
|
||||
#define TAP_CODE_DELAY 10
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
#define RGB_DISABLE_WHEN_USB_SUSPENDED
|
||||
|
||||
/* External spi flash */
|
||||
#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN B14
|
||||
#define WEAR_LEVELING_BACKING_SIZE 2048
|
||||
|
||||
/* SPI Config for LED Driver */
|
||||
#define SPI_DRIVER SPIDQ
|
||||
#define SPI_SCK_PIN A5
|
||||
#define SPI_MOSI_PIN A7
|
||||
#define SPI_MISO_PIN A6
|
||||
|
||||
#define DRIVER_1_CS A15
|
||||
#define DRIVER_2_CS B15
|
||||
#define DRIVER_1_EN C13
|
||||
#define DRIVER_2_EN C13
|
||||
|
||||
#define DRIVER_COUNT 2
|
||||
#define DRIVER_1_LED_TOTAL 66
|
||||
#define DRIVER_2_LED_TOTAL 54
|
||||
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
|
||||
|
||||
// RGB Matrix Animation modes. Explicitly enabled
|
||||
// For full list of effects, see:
|
||||
// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
|
||||
#define ENABLE_RGB_MATRIX_ALPHAS_MODS
|
||||
#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
|
||||
#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
|
||||
#define ENABLE_RGB_MATRIX_BREATHING
|
||||
#define ENABLE_RGB_MATRIX_BAND_SAT
|
||||
#define ENABLE_RGB_MATRIX_BAND_VAL
|
||||
#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
|
||||
#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
|
||||
#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
|
||||
#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
|
||||
#define ENABLE_RGB_MATRIX_CYCLE_ALL
|
||||
#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
|
||||
#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
|
||||
#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
|
||||
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
|
||||
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
|
||||
#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
|
||||
#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
|
||||
#define ENABLE_RGB_MATRIX_DUAL_BEACON
|
||||
#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
|
||||
#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
|
||||
#define ENABLE_RGB_MATRIX_RAINDROPS
|
||||
#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
|
||||
#define ENABLE_RGB_MATRIX_HUE_BREATHING
|
||||
#define ENABLE_RGB_MATRIX_HUE_PENDULUM
|
||||
#define ENABLE_RGB_MATRIX_HUE_WAVE
|
||||
#define ENABLE_RGB_MATRIX_PIXEL_RAIN
|
||||
#define ENABLE_RGB_MATRIX_PIXEL_FLOW
|
||||
#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
|
||||
// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
|
||||
#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
|
||||
#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
|
||||
// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
|
||||
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
|
||||
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE
|
||||
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
|
||||
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
|
||||
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
|
||||
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
|
||||
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
|
||||
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
|
||||
#define ENABLE_RGB_MATRIX_SPLASH
|
||||
#define ENABLE_RGB_MATRIX_MULTISPLASH
|
||||
#define ENABLE_RGB_MATRIX_SOLID_SPLASH
|
||||
#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
|
||||
|
||||
|
||||
/* Send up to 4 key press events per scan */
|
||||
#define QMK_KEYS_PER_SCAN 4
|
||||
|
||||
/* Set debounce time to 5ms */
|
||||
#define DEBOUNCE 5
|
||||
|
||||
/* Force NKRO on boot up regardless of the setting saved in the EEPROM (uncomment to enable it) */
|
||||
// #define FORCE_NKRO
|
29
keyboards/gmmk/gmmk2/p96/halconf.h
Normal file
29
keyboards/gmmk/gmmk2/p96/halconf.h
Normal file
@ -0,0 +1,29 @@
|
||||
/* Copyright (C) 2021 Westberry Technology (ChangZhou) Corp., Ltd
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file was auto-generated by:
|
||||
* `qmk chibios-confmigrate -i keyboards/wb_support/gmmk2/halconf.h -r platforms/chibios/boards/common/configs/halconf.h`
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define HAL_USE_SPI TRUE
|
||||
#define SPI_USE_WAIT TRUE
|
||||
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
|
||||
|
||||
#include_next <halconf.h>
|
||||
|
21
keyboards/gmmk/gmmk2/p96/iso/config.h
Normal file
21
keyboards/gmmk/gmmk2/p96/iso/config.h
Normal file
@ -0,0 +1,21 @@
|
||||
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com>
|
||||
*
|
||||
* 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 "config_common.h"
|
||||
|
||||
#define PRODUCT_ID 0x505A
|
120
keyboards/gmmk/gmmk2/p96/iso/info.json
Normal file
120
keyboards/gmmk/gmmk2/p96/iso/info.json
Normal file
@ -0,0 +1,120 @@
|
||||
{
|
||||
"keyboard_name": "GMMK V2 96 ISO",
|
||||
"url": "http://www.pcgamingrace.com",
|
||||
"maintainer": "GloriousThrall",
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{ "label": "ESC", "x": 0, "y": 0 },
|
||||
|
||||
{ "label": "F1", "x": 1.25, "y": 0 },
|
||||
{ "label": "F2", "x": 2.25, "y": 0 },
|
||||
{ "label": "F3", "x": 3.25, "y": 0 },
|
||||
{ "label": "F4", "x": 4.25, "y": 0 },
|
||||
|
||||
{ "label": "F5", "x": 5.5, "y": 0 },
|
||||
{ "label": "F6", "x": 6.5, "y": 0 },
|
||||
{ "label": "F7", "x": 7.5, "y": 0 },
|
||||
{ "label": "F8", "x": 8.5, "y": 0 },
|
||||
|
||||
{ "label": "F9", "x": 9.75, "y": 0 },
|
||||
{ "label": "F10", "x": 10.75, "y": 0 },
|
||||
{ "label": "F11", "x": 11.75, "y": 0 },
|
||||
{ "label": "F12", "x": 12.75, "y": 0 },
|
||||
|
||||
{ "label": "Printscreen", "x": 14, "y": 0 },
|
||||
{ "label": "Delete", "x": 15.5, "y": 0 },
|
||||
{ "label": "Insert", "x": 16.5, "y": 0 },
|
||||
{ "label": "Page Up", "x": 17.5, "y": 0 },
|
||||
{ "label": "Page Down", "x": 18.5, "y": 0 },
|
||||
|
||||
{ "label": "`", "x": 0, "y": 1 },
|
||||
{ "label": "1", "x": 1, "y": 1 },
|
||||
{ "label": "2", "x": 2, "y": 1 },
|
||||
{ "label": "3", "x": 3, "y": 1 },
|
||||
{ "label": "4", "x": 4, "y": 1 },
|
||||
{ "label": "5", "x": 5, "y": 1 },
|
||||
{ "label": "6", "x": 6, "y": 1 },
|
||||
{ "label": "7", "x": 7, "y": 1 },
|
||||
{ "label": "8", "x": 8, "y": 1 },
|
||||
{ "label": "9", "x": 9, "y": 1 },
|
||||
{ "label": "0", "x": 10, "y": 1 },
|
||||
{ "label": "-", "x": 11, "y": 1 },
|
||||
{ "label": "=", "x": 12, "y": 1 },
|
||||
{ "label": "Backspace", "x": 13, "y": 1, "w": 2},
|
||||
{ "label": "Num Lock", "x": 15.5, "y": 1 },
|
||||
{ "label": "/", "x": 16.5, "y": 1 },
|
||||
{ "label": "*", "x": 17.5, "y": 1 },
|
||||
{ "label": "-", "x": 18.5, "y": 1 },
|
||||
|
||||
{ "label": "Tab", "x": 0, "y": 2, "w": 1.5},
|
||||
{ "label": "Q", "x": 1.5, "y": 2 },
|
||||
{ "label": "W", "x": 2.5, "y": 2 },
|
||||
{ "label": "E", "x": 3.5, "y": 2 },
|
||||
{ "label": "R", "x": 4.5, "y": 2 },
|
||||
{ "label": "T", "x": 5.5, "y": 2 },
|
||||
{ "label": "Y", "x": 6.5, "y": 2 },
|
||||
{ "label": "U", "x": 7.5, "y": 2 },
|
||||
{ "label": "I", "x": 8.5, "y": 2 },
|
||||
{ "label": "O", "x": 9.5, "y": 2 },
|
||||
{ "label": "P", "x": 10.5, "y": 2 },
|
||||
{ "label": "[", "x": 11.5, "y": 2 },
|
||||
{ "label": "]", "x": 12.5, "y": 2 },
|
||||
{ "label": "Enter", "x": 13.5, "y": 2 ,"h":2, "w": 1.25},
|
||||
{ "label": "7", "x": 15.5, "y": 2 },
|
||||
{ "label": "8", "x": 16.5, "y": 2 },
|
||||
{ "label": "9", "x": 17.5, "y": 2, "w": 1.5},
|
||||
{ "label": "+", "x": 18.5, "y": 2 ,"h":2},
|
||||
|
||||
{ "label": "Caps Lock", "x": 0, "y": 3, "w": 1.75},
|
||||
{ "label": "A", "x": 1.75, "y": 3 },
|
||||
{ "label": "S", "x": 2.75, "y": 3 },
|
||||
{ "label": "D", "x": 3.75, "y": 3 },
|
||||
{ "label": "F", "x": 4.75, "y": 3 },
|
||||
{ "label": "G", "x": 5.75, "y": 3 },
|
||||
{ "label": "H", "x": 6.75, "y": 3 },
|
||||
{ "label": "J", "x": 7.75, "y": 3 },
|
||||
{ "label": "K", "x": 8.75, "y": 3 },
|
||||
{ "label": "L", "x": 9.75, "y": 3 },
|
||||
{ "label": ";", "x": 10.75, "y": 3 },
|
||||
{ "label": "'", "x": 11.75, "y": 3 },
|
||||
{ "label": "#", "x": 12.75, "y": 3 },
|
||||
{ "label": "4", "x": 15.5, "y": 3 },
|
||||
{ "label": "5", "x": 16.5, "y": 3 },
|
||||
{ "label": "6", "x": 17.5, "y": 3 },
|
||||
|
||||
{ "label": "Shift", "x": 0, "y": 4, "w": 1.25},
|
||||
{ "label": "\\", "x": 1.25, "y": 4 },
|
||||
{ "label": "Z", "x": 2.25, "y": 4 },
|
||||
{ "label": "X", "x": 3.25, "y": 4 },
|
||||
{ "label": "C", "x": 4.25, "y": 4 },
|
||||
{ "label": "V", "x": 5.25, "y": 4 },
|
||||
{ "label": "B", "x": 6.25, "y": 4 },
|
||||
{ "label": "N", "x": 7.25, "y": 4 },
|
||||
{ "label": "M", "x": 8.25, "y": 4 },
|
||||
{ "label": ",", "x": 9.25, "y": 4 },
|
||||
{ "label": ".", "x": 10.25, "y": 4 },
|
||||
{ "label": "/", "x": 11.25, "y": 4 },
|
||||
{ "label": "Shift", "x": 12.25, "y": 4, "w": 1.75},
|
||||
{ "label": "Up", "x": 14.25, "y": 4 },
|
||||
{ "label": "1", "x": 15.5, "y": 4 },
|
||||
{ "label": "2", "x": 16.5, "y": 4 },
|
||||
{ "label": "3", "x": 17.5, "y": 4 },
|
||||
{ "label": "Enter", "x": 18.5, "y": 4 ,"h":2},
|
||||
|
||||
{ "label": "Ctrl", "x": 0, "y": 5, "w": 1.25},
|
||||
{ "label": "Win", "x": 1.25, "y": 5, "w": 1.25},
|
||||
{ "label": "Alt", "x": 2.5, "y": 5, "w": 1.25},
|
||||
{ "label": "Space", "x": 3.75, "y": 5, "w": 6.25},
|
||||
{ "label": "Alt", "x": 10, "y": 5 },
|
||||
{ "label": "FN", "x": 11, "y": 5 },
|
||||
{ "label": "Ctrl", "x": 12, "y": 5 },
|
||||
{ "label": "Left", "x": 13.25, "y": 5 },
|
||||
{ "label": "Down", "x": 14.25, "y": 5 },
|
||||
{ "label": "Right", "x": 15.25, "y": 5 },
|
||||
{ "label": "0", "x": 16.5, "y": 5 },
|
||||
{ "label": ".", "x": 17.5, "y": 5 }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
328
keyboards/gmmk/gmmk2/p96/iso/iso.c
Normal file
328
keyboards/gmmk/gmmk2/p96/iso/iso.c
Normal file
@ -0,0 +1,328 @@
|
||||
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com>
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "iso.h"
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
|
||||
const aw_led g_aw_leds[DRIVER_LED_TOTAL] = {
|
||||
/* Refer to IS31 manual for these locations
|
||||
* driver
|
||||
* | R location
|
||||
* | | G location
|
||||
* | | | B location
|
||||
* | | | | */
|
||||
{0, CS1_SW1, CS2_SW1, CS3_SW1}, // 0, k00, Esc
|
||||
{0, CS1_SW2, CS2_SW2, CS3_SW2}, // 1, k10, F1
|
||||
{0, CS1_SW3, CS2_SW3, CS3_SW3}, // 2, k20, F2
|
||||
{0, CS1_SW4, CS2_SW4, CS3_SW4}, // 3, k30, F3
|
||||
{0, CS1_SW5, CS2_SW5, CS3_SW5}, // 4, k40, F4
|
||||
{0, CS1_SW6, CS2_SW6, CS3_SW6}, // 5, k50, F5
|
||||
{0, CS1_SW7, CS2_SW7, CS3_SW7}, // 6, k60, F6
|
||||
{0, CS1_SW8, CS2_SW8, CS3_SW8}, // 7, k70, F7
|
||||
{0, CS1_SW9, CS2_SW9, CS3_SW9}, // 8, k80, F8
|
||||
{0, CS1_SW10, CS2_SW10, CS3_SW10}, // 9, k90, F9
|
||||
{0, CS1_SW11, CS2_SW11, CS3_SW11}, // 10, ka0, F10
|
||||
{0, CS1_SW12, CS2_SW12, CS3_SW12}, // 11, kb0, F11
|
||||
{1, CS1_SW1, CS2_SW1, CS3_SW1}, // 12, kc0, F12
|
||||
{1, CS4_SW2, CS5_SW2, CS6_SW2}, // 13, kd0, Printscreen
|
||||
{1, CS4_SW3, CS5_SW3, CS6_SW3}, // 14, k06, Delete
|
||||
{1, CS1_SW2, CS2_SW2, CS3_SW2}, // 15, k16, Insert
|
||||
{1, CS4_SW4, CS5_SW4, CS6_SW4}, // 16, k26, Page Up
|
||||
{1, CS4_SW7, CS5_SW7, CS6_SW7}, // 17, k36, Page Down
|
||||
|
||||
{0, CS4_SW1, CS5_SW1, CS6_SW1}, // 18, k01, `
|
||||
{0, CS4_SW2, CS5_SW2, CS6_SW2}, // 19, k11, 1
|
||||
{0, CS4_SW3, CS5_SW3, CS6_SW3}, // 20, k21, 2
|
||||
{0, CS4_SW4, CS5_SW4, CS6_SW4}, // 21, k31, 3
|
||||
{0, CS4_SW5, CS5_SW5, CS6_SW5}, // 22, k41, 4
|
||||
{0, CS4_SW6, CS5_SW6, CS6_SW6}, // 23, k51, 5
|
||||
{0, CS4_SW7, CS5_SW7, CS6_SW7}, // 24, k61, 6
|
||||
{0, CS4_SW8, CS5_SW8, CS6_SW8}, // 25, k71, 7
|
||||
{0, CS4_SW9, CS5_SW9, CS6_SW9}, // 26, k81, 8
|
||||
{0, CS4_SW10, CS5_SW10, CS6_SW10}, // 27, k91, 9
|
||||
{0, CS4_SW11, CS5_SW11, CS6_SW11}, // 28, ka1, 0
|
||||
{0, CS4_SW12, CS5_SW12, CS6_SW12}, // 29, kb1, -
|
||||
{1, CS1_SW5, CS2_SW5, CS3_SW5}, // 30, kc1, =
|
||||
{1, CS1_SW7, CS2_SW7, CS3_SW7}, // 31, kd1, Backspace
|
||||
{1, CS7_SW1, CS8_SW1, CS9_SW1}, // 32, k46, Num Lock
|
||||
{1, CS7_SW2, CS8_SW2, CS9_SW2}, // 33, k56, Num /
|
||||
{1, CS7_SW3, CS8_SW3, CS9_SW3}, // 34, k66, Num *
|
||||
{1, CS7_SW4, CS8_SW4, CS9_SW4}, // 35, k76, Num -
|
||||
|
||||
{0, CS7_SW1, CS8_SW1, CS9_SW1}, // 36, k02, Tab
|
||||
{0, CS7_SW2, CS8_SW2, CS9_SW2}, // 37, k12, Q
|
||||
{0, CS7_SW3, CS8_SW3, CS9_SW3}, // 38, k22, W
|
||||
{0, CS7_SW4, CS8_SW4, CS9_SW4}, // 39, k32, E
|
||||
{0, CS7_SW5, CS8_SW5, CS9_SW5}, // 40, k42, R
|
||||
{0, CS7_SW6, CS8_SW6, CS9_SW6}, // 41, k52, T
|
||||
{0, CS7_SW7, CS8_SW7, CS9_SW7}, // 42, k62, Y
|
||||
{0, CS7_SW8, CS8_SW8, CS9_SW8}, // 43, k72, U
|
||||
{0, CS7_SW9, CS8_SW9, CS9_SW9}, // 44, k82, I
|
||||
{0, CS7_SW10, CS8_SW10, CS9_SW10}, // 45, k92, O
|
||||
{0, CS7_SW11, CS8_SW11, CS9_SW11}, // 46, ka2, P
|
||||
{0, CS7_SW12, CS8_SW12, CS9_SW12}, // 47, kb2, [
|
||||
{1, CS1_SW8, CS2_SW8, CS3_SW8}, // 48, kc2, ]
|
||||
{1, CS1_SW11, CS2_SW11, CS3_SW11}, // 49, kd3, Enter
|
||||
{1, CS7_SW5, CS8_SW5, CS9_SW5}, // 50, k86, Num 7
|
||||
{1, CS7_SW6, CS8_SW6, CS9_SW6}, // 51, k96, Num 8
|
||||
{1, CS7_SW7, CS8_SW7, CS9_SW7}, // 52, ka6, Num 9
|
||||
{1, CS7_SW8, CS8_SW8, CS9_SW8}, // 53, kb6, Num +
|
||||
|
||||
{0, CS10_SW1, CS11_SW1, CS12_SW1}, // 54, k03, Caps Lock
|
||||
{0, CS10_SW2, CS11_SW2, CS12_SW2}, // 55, k13, A
|
||||
{0, CS10_SW3, CS11_SW3, CS12_SW3}, // 56, k23, S
|
||||
{0, CS10_SW4, CS11_SW4, CS12_SW4}, // 57, k33, D
|
||||
{0, CS10_SW5, CS11_SW5, CS12_SW5}, // 58, k43, F
|
||||
{0, CS10_SW6, CS11_SW6, CS12_SW6}, // 59, k53, G
|
||||
{0, CS10_SW7, CS11_SW7, CS12_SW7}, // 60, k63, H
|
||||
{0, CS10_SW8, CS11_SW8, CS12_SW8}, // 61, k73, J
|
||||
{0, CS10_SW9, CS11_SW9, CS12_SW9}, // 62, k83, K
|
||||
{0, CS10_SW10, CS11_SW10, CS12_SW10}, // 63, k93, L
|
||||
{0, CS10_SW11, CS11_SW11, CS12_SW11}, // 64, ka3, ;
|
||||
{0, CS10_SW12, CS11_SW12, CS12_SW12}, // 65, kb3, '
|
||||
{1, CS1_SW10, CS2_SW10, CS3_SW10}, // 66, kc3, #
|
||||
{1, CS7_SW9, CS8_SW9, CS9_SW9}, // 67, ka7, Num 4
|
||||
{1, CS7_SW10, CS8_SW10, CS9_SW10}, // 68, kb7, Num 5
|
||||
{1, CS7_SW11, CS8_SW11, CS9_SW11}, // 69, kc7, Num 6
|
||||
|
||||
{0, CS13_SW1, CS14_SW1, CS15_SW1}, // 70, k04, Shift_L
|
||||
{0, CS13_SW12, CS14_SW12, CS15_SW12}, // 71, k14, "\\"
|
||||
{0, CS13_SW2, CS14_SW2, CS15_SW2}, // 72, k24, Z
|
||||
{0, CS13_SW3, CS14_SW3, CS15_SW3}, // 73, k34, X
|
||||
{0, CS13_SW4, CS14_SW4, CS15_SW4}, // 74, k44, C
|
||||
{0, CS13_SW5, CS14_SW5, CS15_SW5}, // 75, k54, V
|
||||
{0, CS13_SW6, CS14_SW6, CS15_SW6}, // 76, k64, B
|
||||
{0, CS13_SW7, CS14_SW7, CS15_SW7}, // 77, k74, N
|
||||
{0, CS13_SW8, CS14_SW8, CS15_SW8}, // 78, k84, M
|
||||
{0, CS13_SW9, CS14_SW9, CS15_SW9}, // 79, k94, ,
|
||||
{0, CS13_SW10, CS14_SW10, CS15_SW10}, // 80, ka4, .
|
||||
{0, CS13_SW11, CS14_SW11, CS15_SW11}, // 81, kb4, /
|
||||
{1, CS4_SW8, CS5_SW8, CS6_SW8}, // 82, kd4, Shift_R
|
||||
{1, CS4_SW9, CS5_SW9, CS6_SW9}, // 83, k17, Up
|
||||
{1, CS10_SW1, CS11_SW1, CS12_SW1}, // 84, k67, Num 1
|
||||
{1, CS10_SW2, CS11_SW2, CS12_SW2}, // 85, k77, Num 2
|
||||
{1, CS10_SW3, CS11_SW3, CS12_SW3}, // 86, k87, Num 3
|
||||
{1, CS10_SW4, CS11_SW4, CS12_SW4}, // 87, k97, Enter_R
|
||||
|
||||
{0, CS16_SW1, CS17_SW1, CS18_SW1}, // 88, k05, Ctrl_L
|
||||
{0, CS16_SW2, CS17_SW2, CS18_SW2}, // 89, k15, Win_L
|
||||
{0, CS16_SW3, CS17_SW3, CS18_SW3}, // 90, k25, Alt_L
|
||||
{0, CS16_SW6, CS17_SW6, CS18_SW6}, // 91, k65, Space
|
||||
{0, CS16_SW9, CS17_SW9, CS18_SW9}, // 92, k95, Alt_R
|
||||
{0, CS16_SW10, CS17_SW10, CS18_SW10}, // 93, ka5, FN
|
||||
{0, CS16_SW12, CS17_SW12, CS18_SW12}, // 94, kc5, Ctrl_R
|
||||
{1, CS4_SW10, CS5_SW10, CS6_SW10}, // 95, k07, Left
|
||||
{1, CS4_SW11, CS5_SW11, CS6_SW11}, // 96, k27, Down
|
||||
{1, CS10_SW5, CS11_SW5, CS12_SW5}, // 97, k37, Right
|
||||
{1, CS10_SW6, CS11_SW6, CS12_SW6}, // 98, k47, Num 0
|
||||
{1, CS10_SW7, CS11_SW7, CS12_SW7}, // 99, k57, Num .
|
||||
|
||||
{1, CS13_SW1, CS14_SW1, CS15_SW1}, // 101, LED 1
|
||||
{1, CS13_SW2, CS14_SW2, CS15_SW2}, // 102, LED 2
|
||||
{1, CS13_SW3, CS14_SW3, CS15_SW3}, // 103, LED 3
|
||||
{1, CS13_SW4, CS14_SW4, CS15_SW4}, // 104, LED 4
|
||||
{1, CS13_SW5, CS14_SW5, CS15_SW5}, // 105, LED 5
|
||||
{1, CS13_SW6, CS14_SW6, CS15_SW6}, // 106, LED 6
|
||||
{1, CS13_SW7, CS14_SW7, CS15_SW7}, // 107, LED 7
|
||||
{1, CS13_SW8, CS14_SW8, CS15_SW8}, // 108, LED 8
|
||||
{1, CS13_SW9, CS14_SW9, CS15_SW9}, // 109, LED 9
|
||||
{1, CS13_SW10, CS14_SW10, CS15_SW10}, // 110, LED 10
|
||||
{1, CS16_SW1, CS17_SW1, CS18_SW1}, // 111, LED 11
|
||||
{1, CS16_SW2, CS17_SW2, CS18_SW2}, // 112, LED 12
|
||||
{1, CS16_SW3, CS17_SW3, CS18_SW3}, // 113, LED 13
|
||||
{1, CS16_SW4, CS17_SW4, CS18_SW4}, // 114, LED 14
|
||||
{1, CS16_SW5, CS17_SW5, CS18_SW5}, // 115, LED 15
|
||||
{1, CS16_SW6, CS17_SW6, CS18_SW6}, // 116, LED 16
|
||||
{1, CS16_SW7, CS17_SW7, CS18_SW7}, // 117, LED 17
|
||||
{1, CS16_SW8, CS17_SW8, CS18_SW8}, // 118, LED 18
|
||||
{1, CS16_SW9, CS17_SW9, CS18_SW9}, // 119, LED 19
|
||||
{1, CS16_SW10, CS17_SW10, CS18_SW10} // 120, LED 20
|
||||
};
|
||||
|
||||
#define __ NO_LED
|
||||
|
||||
led_config_t g_led_config = {{
|
||||
{ 0, 18, 36, 54, 70, 88, 14, 95},
|
||||
{ 1, 19, 37, 55, 71, 89, 15, 83},
|
||||
{ 2, 20, 38, 56, 72, 90, 16, 96},
|
||||
{ 3, 21, 39, 57, 73, __, 17, 97},
|
||||
{ 4, 22, 40, 58, 74, __, 32, 98},
|
||||
{ 5, 23, 41, 59, 75, __, 33, 99},
|
||||
{ 6, 24, 42, 60, 76, 91, 34, 84},
|
||||
{ 7, 25, 43, 61, 77, __, 35, 85},
|
||||
{ 8, 26, 44, 62, 78, __, 50, 86},
|
||||
{ 9, 27, 45, 63, 79, 92, 51, 87},
|
||||
{10, 28, 46, 64, 80, 93, 52, 67},
|
||||
{11, 29, 47, 65, 81, __, 53, 68},
|
||||
{12, 30, 48, 66, __, 94, __, 69},
|
||||
{13, 31, __, 49, 82, __, __, __}
|
||||
}, {
|
||||
{ 11, 0}, // 0, k00, Esc
|
||||
{ 22, 0}, // 1, k10, F1
|
||||
{ 33, 0}, // 2, k20, F2
|
||||
{ 44, 0}, // 3, k30, F3
|
||||
{ 55, 0}, // 4, k40, F4
|
||||
{ 66, 0}, // 5, k50, F5
|
||||
{ 77, 0}, // 6, k60, F6
|
||||
{ 88, 0}, // 7, k70, F7
|
||||
{ 99, 0}, // 8, k80, F8
|
||||
{ 110, 0}, // 9, k90, F9
|
||||
{ 121, 0}, // 10, ka0, F10
|
||||
{ 132, 0}, // 11, kb0, F11
|
||||
{ 143, 0}, // 12, kc0, F12
|
||||
{ 154, 0}, // 13, kd0, Printscreen
|
||||
{ 165, 0}, // 14, k06, Delete
|
||||
{ 176, 0}, // 15, k16, Insert
|
||||
{ 187, 0}, // 16, k26, Page Up
|
||||
{ 198, 0}, // 17, k36, Page Down
|
||||
{ 11, 11}, // 18, k01, `
|
||||
{ 22, 11}, // 19, k11, 1
|
||||
{ 33, 11}, // 20, k21, 2
|
||||
{ 44, 11}, // 21, k31, 3
|
||||
{ 55, 11}, // 22, k41, 4
|
||||
{ 66, 11}, // 23, k51, 5
|
||||
{ 77, 11}, // 24, k61, 6
|
||||
{ 88, 11}, // 25, k71, 7
|
||||
{ 99, 11}, // 26, k81, 8
|
||||
{ 110, 11}, // 27, k91, 9
|
||||
{ 121, 11}, // 28, ka1, 0
|
||||
{ 132, 11}, // 29, kb1, -
|
||||
{ 143, 11}, // 30, kc1, =
|
||||
{ 154, 11}, // 31, kd1, Backspace
|
||||
{ 165, 11}, // 32, k46, Num Lock
|
||||
{ 176, 11}, // 33, k56, Num /
|
||||
{ 187, 11}, // 34, k66, Num *
|
||||
{ 198, 11}, // 35, k76, Num -
|
||||
{ 11, 22}, // 36, k02, Tab
|
||||
{ 22, 22}, // 37, k12, Q
|
||||
{ 33, 22}, // 38, k22, W
|
||||
{ 44, 22}, // 39, k32, E
|
||||
{ 55, 22}, // 40, k42, R
|
||||
{ 66, 22}, // 41, k52, T
|
||||
{ 77, 22}, // 42, k62, Y
|
||||
{ 88, 22}, // 43, k72, U
|
||||
{ 99, 22}, // 44, k82, I
|
||||
{ 110, 22}, // 45, k92, O
|
||||
{ 121, 22}, // 46, ka2, P
|
||||
{ 132, 22}, // 47, kb2, [
|
||||
{ 143, 22}, // 48, kc2, ]
|
||||
{ 154, 22}, // 49, kd3, Enter
|
||||
{ 165, 22}, // 50, k86, Num 7
|
||||
{ 176, 22}, // 51, k96, Num 8
|
||||
{ 187, 22}, // 52, ka6, Num 9
|
||||
{ 198, 22}, // 53, kb6, Num +
|
||||
{ 11, 33}, // 54, k03, Caps Lock
|
||||
{ 22, 33}, // 55, k13, A
|
||||
{ 33, 33}, // 56, k23, S
|
||||
{ 44, 33}, // 57, k33, D
|
||||
{ 55, 33}, // 58, k43, F
|
||||
{ 66, 33}, // 59, k53, G
|
||||
{ 77, 33}, // 60, k63, H
|
||||
{ 88, 33}, // 61, k73, J
|
||||
{ 99, 33}, // 62, k83, K
|
||||
{ 110, 33}, // 63, k93, L
|
||||
{ 121, 33}, // 64, ka3, ;
|
||||
{ 132, 33}, // 65, kb3, '
|
||||
{ 143, 33}, // 66, kc3, #
|
||||
{ 165, 33}, // 67, ka7, Num 4
|
||||
{ 176, 33}, // 68, kb7, Num 5
|
||||
{ 187, 33}, // 69, kc7, Num 6
|
||||
{ 11, 44}, // 70, k04, Shift_L
|
||||
{ 22, 44}, // 71, k14, "\\"
|
||||
{ 33, 44}, // 72, k24, Z
|
||||
{ 44, 44}, // 73, k34, X
|
||||
{ 55, 44}, // 74, k44, C
|
||||
{ 66, 44}, // 75, k54, V
|
||||
{ 77, 44}, // 76, k64, B
|
||||
{ 88, 44}, // 77, k74, N
|
||||
{ 99, 44}, // 78, k84, M
|
||||
{ 110, 44}, // 79, k94, ,
|
||||
{ 121, 44}, // 80, ka4, .
|
||||
{ 132, 44}, // 81, kb4, /
|
||||
{ 143, 44}, // 82, kd4, Shift_R
|
||||
{ 154, 44}, // 83, k17, Up
|
||||
{ 165, 44}, // 84, k67, Num 1
|
||||
{ 176, 44}, // 85, k77, Num 2
|
||||
{ 187, 44}, // 86, k87, Num 3
|
||||
{ 198, 44}, // 87, k97, Enter_R
|
||||
{ 11, 55}, // 88, k05, Ctrl_L
|
||||
{ 22, 55}, // 89, k15, Win_L
|
||||
{ 33, 55}, // 90, k25, Alt_L
|
||||
{ 77, 55}, // 91, k65, Space
|
||||
{ 110, 55}, // 92, k95, Alt_R
|
||||
{ 121, 55}, // 93, ka5, FN
|
||||
{ 132, 55}, // 94, kc5, Ctrl_R
|
||||
{ 143, 55}, // 95, k07, Left
|
||||
{ 154, 55}, // 96, k27, Down
|
||||
{ 165, 55}, // 97, k37, Right
|
||||
{ 176, 55}, // 98, k47, Num 0
|
||||
{ 187, 55}, // 99, k57, Num .
|
||||
{ 0, 0}, // 101, LED 1
|
||||
{ 0, 6}, // 102, LED 2
|
||||
{ 0, 12}, // 103, LED 3
|
||||
{ 0, 18}, // 104, LED 4
|
||||
{ 0, 24}, // 105, LED 5
|
||||
{ 0, 30}, // 106, LED 6
|
||||
{ 0, 36}, // 107, LED 7
|
||||
{ 0, 42}, // 108, LED 8
|
||||
{ 0, 48}, // 109, LED 9
|
||||
{ 0, 54}, // 110, LED 10
|
||||
{ 209, 0}, // 111, LED 11
|
||||
{ 209, 6}, // 112, LED 12
|
||||
{ 209, 12}, // 113, LED 13
|
||||
{ 209, 18}, // 114, LED 14
|
||||
{ 209, 24}, // 115, LED 15
|
||||
{ 209, 30}, // 116, LED 16
|
||||
{ 209, 36}, // 117, LED 17
|
||||
{ 209, 42}, // 118, LED 18
|
||||
{ 209, 48}, // 119, LED 19
|
||||
{ 209, 54} // 120, LED 20
|
||||
}, {
|
||||
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4,
|
||||
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||
2, 2, 2, 2, 2, 2, 2, 2, 2, 2
|
||||
} };
|
||||
#endif
|
||||
|
||||
#ifdef EEPROM_ENABLE
|
||||
|
||||
#include "spi_master.h"
|
||||
|
||||
void spi_init(void) {
|
||||
static bool is_initialised = false;
|
||||
if (!is_initialised) {
|
||||
is_initialised = true;
|
||||
|
||||
// Try releasing special pins for a short time
|
||||
setPinInput(SPI_SCK_PIN);
|
||||
setPinInput(SPI_MOSI_PIN);
|
||||
setPinInput(SPI_MISO_PIN);
|
||||
|
||||
chThdSleepMilliseconds(10);
|
||||
|
||||
palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_ALTERNATE(SPI_SCK_PAL_MODE) | PAL_OUTPUT_TYPE_PUSHPULL | PAL_OUTPUT_SPEED_HIGHEST | PAL_WB32_CURRENT_LEVEL3);
|
||||
palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_ALTERNATE(SPI_MOSI_PAL_MODE) | PAL_OUTPUT_TYPE_PUSHPULL | PAL_OUTPUT_SPEED_HIGHEST);
|
||||
palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_ALTERNATE(SPI_MISO_PAL_MODE) | PAL_OUTPUT_TYPE_PUSHPULL | PAL_OUTPUT_SPEED_HIGHEST);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
54
keyboards/gmmk/gmmk2/p96/iso/iso.h
Normal file
54
keyboards/gmmk/gmmk2/p96/iso/iso.h
Normal file
@ -0,0 +1,54 @@
|
||||
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com>
|
||||
*
|
||||
* 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"
|
||||
|
||||
#define ___ KC_NO
|
||||
|
||||
// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Del Ins PgUp PgDn
|
||||
// ` 1 2 3 4 5 6 7 8 9 0 - = BSpc Num / * -
|
||||
// Tab Q W E R T Y U I O P [ ] Enter 7 8 9 +
|
||||
// Caps A S D F G H J K L ; ' # Enter 4 5 6 +
|
||||
// Sh_L \ Z X C V B N M , . / Sh_R Up 1 2 3 Enter
|
||||
// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right 0 . Enter
|
||||
|
||||
// clang-format off
|
||||
#define LAYOUT( \
|
||||
k00, k10, k20, k30, k40, k50, k60, k70, k80, k90, ka0, kb0, kc0, kd0, k06, k16, k26, k36,\
|
||||
k01, k11, k21, k31, k41, k51, k61, k71, k81, k91, ka1, kb1, kc1, kd1, k46, k56, k66, k76,\
|
||||
k02, k12, k22, k32, k42, k52, k62, k72, k82, k92, ka2, kb2, kc2, kd3, k86, k96, ka6, kb6,\
|
||||
k03, k13, k23, k33, k43, k53, k63, k73, k83, k93, ka3, kb3, kc3, ka7, kb7, kc7, \
|
||||
k04, k14, k24, k34, k44, k54, k64, k74, k84, k94, ka4, kb4, kd4, k17, k67, k77, k87, k97,\
|
||||
k05, k15, k25, k65, k95, ka5, kc5, k07, k27, k37, k47, k57 \
|
||||
)\
|
||||
{\
|
||||
{ k00, k01, k02, k03, k04, k05, k06, k07},\
|
||||
{ k10, k11, k12, k13, k14, k15, k16, k17},\
|
||||
{ k20, k21, k22, k23, k24, k25, k26, k27},\
|
||||
{ k30, k31, k32, k33, k34, ___, k36, k37},\
|
||||
{ k40, k41, k42, k43, k44, ___, k46, k47},\
|
||||
{ k50, k51, k52, k53, k54, ___, k56, k57},\
|
||||
{ k60, k61, k62, k63, k64, k65, k66, k67},\
|
||||
{ k70, k71, k72, k73, k74, ___, k76, k77},\
|
||||
{ k80, k81, k82, k83, k84, ___, k86, k87},\
|
||||
{ k90, k91, k92, k93, k94, k95, k96, k97},\
|
||||
{ ka0, ka1, ka2, ka3, ka4, ka5, ka6, ka7},\
|
||||
{ kb0, kb1, kb2, kb3, kb4, ___, kb6, kb7},\
|
||||
{ kc0, kc1, kc2, kc3, ___, kc5, ___, kc7},\
|
||||
{ kd0, kd1, ___, kd3, kd4, ___, ___, ___} \
|
||||
}
|
44
keyboards/gmmk/gmmk2/p96/iso/keymaps/default/keymap.c
Normal file
44
keyboards/gmmk/gmmk2/p96/iso/keymaps/default/keymap.c
Normal file
@ -0,0 +1,44 @@
|
||||
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com>
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
#define _BL 0
|
||||
#define _FL 1
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap _BL: Base Layer (Default Layer)
|
||||
*/
|
||||
[_BL] = LAYOUT(
|
||||
KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_DEL, KC_INS, KC_PGUP, KC_PGDN,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_ENT, KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_P4, KC_P5, KC_P6,
|
||||
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT),
|
||||
|
||||
/* Keymap _FL: Function Layer
|
||||
*/
|
||||
[_FL] = LAYOUT(
|
||||
RESET, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MRWD, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLU, KC_VOLD, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, RGB_SAI, RGB_SAD, RGB_SPD, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, _______, _______, _______,
|
||||
_______, UC_M_WI, _______, _______, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_MOD, _______, _______)
|
||||
};
|
1
keyboards/gmmk/gmmk2/p96/iso/keymaps/default/readme.md
Normal file
1
keyboards/gmmk/gmmk2/p96/iso/keymaps/default/readme.md
Normal file
@ -0,0 +1 @@
|
||||
# ISO GMMKV2 96% Layout
|
22
keyboards/gmmk/gmmk2/p96/iso/keymaps/via/config.h
Normal file
22
keyboards/gmmk/gmmk2/p96/iso/keymaps/via/config.h
Normal file
@ -0,0 +1,22 @@
|
||||
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com>
|
||||
*
|
||||
* 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 "config_common.h"
|
||||
|
||||
#define DYNAMIC_KEYMAP_LAYER_COUNT 3
|
||||
#define STM32_USB_USE_OTG1 TRUE
|
51
keyboards/gmmk/gmmk2/p96/iso/keymaps/via/keymap.c
Normal file
51
keyboards/gmmk/gmmk2/p96/iso/keymaps/via/keymap.c
Normal file
@ -0,0 +1,51 @@
|
||||
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com>
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
#define _BL 0
|
||||
#define _FL 1
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap _BL: Base Layer (Default Layer)
|
||||
*/
|
||||
[_BL] = LAYOUT(
|
||||
KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_DEL, KC_INS, KC_PGUP, KC_PGDN,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_ENT, KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_P4, KC_P5, KC_P6,
|
||||
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT),
|
||||
|
||||
/* Keymap _FL: Function Layer
|
||||
*/
|
||||
[_FL] = LAYOUT(
|
||||
RESET, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MRWD, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLU, KC_VOLD, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, RGB_SAI, RGB_SAD, RGB_SPD, RGB_SPI, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, _______, _______, _______,
|
||||
_______, UC_M_WI, _______, _______, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_MOD, _______, _______),
|
||||
[2] = LAYOUT(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______)
|
||||
};
|
1
keyboards/gmmk/gmmk2/p96/iso/keymaps/via/rules.mk
Normal file
1
keyboards/gmmk/gmmk2/p96/iso/keymaps/via/rules.mk
Normal file
@ -0,0 +1 @@
|
||||
VIA_ENABLE = yes
|
23
keyboards/gmmk/gmmk2/p96/iso/readme.md
Normal file
23
keyboards/gmmk/gmmk2/p96/iso/readme.md
Normal file
@ -0,0 +1,23 @@
|
||||
# GMMK V2 96% (ISO)
|
||||
|
||||
A keyboard made and sold by Glorious LLC. Equipped with the WestBerry G7 ARM Cortex-M4 microcontroller
|
||||
|
||||
* Keyboard Maintainer: [GloriousThrall](https://github.com/GloriousThrall)
|
||||
* Hardware Supported: GMMK V2
|
||||
* Hardware Availability: [GloriousPCGaming.com](https://www.pcgamingrace.com)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make gmmk/gmmk2/p96/iso:default
|
||||
|
||||
Flashing example for this keyboard:
|
||||
|
||||
make gmmk/gmmk2/p96/iso:default:flash
|
||||
|
||||
To reset the board into bootloader mode, do one of the following:
|
||||
|
||||
* Hold the Reset switch mounted on the surface of the PCB while connecting the USB cable (remove the spacebar key and press and hold the pin on the right side)
|
||||
* Hold the Escape key while connecting the USB cable (also erases persistent settings)
|
||||
* Fn+Backslash will reset the board to bootloader mode if you have flashed the default QMK keymap
|
||||
|
||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
22
keyboards/gmmk/gmmk2/p96/iso/rules.mk
Normal file
22
keyboards/gmmk/gmmk2/p96/iso/rules.mk
Normal file
@ -0,0 +1,22 @@
|
||||
# MCU name
|
||||
MCU = WB32F3G71
|
||||
|
||||
# Bootloader selection
|
||||
BOOTLOADER = wb32-dfu
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite.
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys.
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control.
|
||||
CONSOLE_ENABLE = no # Console for debug.
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration.
|
||||
NKRO_ENABLE = yes # Enable NKRO Rollover.
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality.
|
||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow.
|
||||
AUDIO_ENABLE = no # Audio output.
|
||||
RGB_MATRIX_ENABLE = yes # Enable RGB matrix effects.
|
||||
RGB_MATRIX_DRIVER = AW20216 # Enable RGB matrix effects.
|
||||
EEPROM_DRIVER = wear_leveling
|
||||
WEAR_LEVELING_DRIVER = spi_flash
|
30
keyboards/gmmk/gmmk2/p96/mcuconf.h
Normal file
30
keyboards/gmmk/gmmk2/p96/mcuconf.h
Normal file
@ -0,0 +1,30 @@
|
||||
/* Copyright (C) 2021 Westberry Technology (ChangZhou) Corp., Ltd
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file was auto-generated by:
|
||||
* `qmk chibios-confmigrate -i keyboards/wb_support/gmmk2/mcuconf.h -r platforms/chibios/GENERIC_WB32_F3G71XX/configs/mcuconf.h`
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef WB32_SPI_USE_QSPI
|
||||
#define WB32_SPI_USE_QSPI TRUE
|
||||
|
||||
#undef WB32_SPI_USE_SPIM2
|
||||
#define WB32_SPI_USE_SPIM2 TRUE
|
17
keyboards/gmmk/gmmk2/p96/p96.c
Normal file
17
keyboards/gmmk/gmmk2/p96/p96.c
Normal file
@ -0,0 +1,17 @@
|
||||
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com>
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "p96.h"
|
25
keyboards/gmmk/gmmk2/p96/p96.h
Normal file
25
keyboards/gmmk/gmmk2/p96/p96.h
Normal file
@ -0,0 +1,25 @@
|
||||
/* Copyright 2021 Glorious, LLC <salman@pcgamingrace.com>
|
||||
*
|
||||
* 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"
|
||||
|
||||
#if defined(KEYBOARD_gmmk_gmmk2_p96_ansi)
|
||||
# include "ansi/ansi.h"
|
||||
#elif defined(KEYBOARD_gmmk_gmmk2_p96_iso)
|
||||
# include "iso/iso.h"
|
||||
#endif // GMMK V2 revisions
|
Loading…
Reference in New Issue
Block a user