Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GMMK Numpad (Default, Via) #20067

Merged
merged 34 commits into from
Apr 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
eb6555f
GMMK Numpad (Default, Via, Vial)
RustedAperture Mar 8, 2023
f0b17ab
Fix Product URL
RustedAperture Mar 8, 2023
56a3098
Fix License Headers
RustedAperture Mar 8, 2023
1f89a6d
Remove Vial, add Readme, Remove duplicate defines
RustedAperture Mar 9, 2023
afe4ab9
Port Keymap, Remove Duplicate config.h
RustedAperture Mar 9, 2023
f7be695
Duplicate Encoder Config
RustedAperture Mar 9, 2023
9ef126d
Clean Up Code
RustedAperture Mar 9, 2023
3bfc15b
Code Cleanup
RustedAperture Mar 9, 2023
42c8ad9
Fix RGB
RustedAperture Mar 9, 2023
e7f9f9c
encoder_update_user
RustedAperture Mar 9, 2023
e60e917
Reverse Encoder
RustedAperture Mar 9, 2023
c3af9b3
Moving RGB Init to pre_init_user
RustedAperture Mar 11, 2023
8c6caec
Update keyboards/gmmk/numpad/readme.md
RustedAperture Mar 11, 2023
a1ea35f
Update keyboards/gmmk/numpad/readme.md
RustedAperture Mar 11, 2023
8c1c49e
Lower wait to 1000ms
RustedAperture Mar 11, 2023
0ba9c4b
Slider Working
RustedAperture Mar 11, 2023
a7fd263
Encoder Button
RustedAperture Mar 12, 2023
f83145f
Fix: Encoder Push
RustedAperture Mar 12, 2023
5622618
Enable Midi Advanced
RustedAperture Mar 12, 2023
972056a
Update keyboards/gmmk/numpad/keymaps/default/keymap.c
RustedAperture Mar 16, 2023
e87a652
Update keyboards/gmmk/numpad/keymaps/via/keymap.c
RustedAperture Mar 16, 2023
61c900d
Update keyboards/gmmk/numpad/numpad.c
RustedAperture Mar 16, 2023
2f7a64e
Update keyboards/gmmk/numpad/numpad.c
RustedAperture Mar 16, 2023
d62b9d2
Update Headers
RustedAperture Mar 16, 2023
e45d852
Update keyboards/gmmk/numpad/info.json
RustedAperture Mar 21, 2023
8c0d31c
remove uneeded code
RustedAperture Mar 21, 2023
29b5080
Add Matrix for push encoder (but no encoder push yet)
RustedAperture Mar 21, 2023
935d5b6
Added Working Encoder Push!!!!!
RustedAperture Mar 21, 2023
b5cfdf0
Update layout to show where the encoder is
RustedAperture Mar 21, 2023
864a05a
Show encoder position on default keymap
RustedAperture Mar 21, 2023
cd15863
Update keyboards/gmmk/numpad/matrix.c
RustedAperture Mar 21, 2023
a1335c4
Update keyboards/gmmk/numpad/matrix.c
RustedAperture Mar 21, 2023
00ab7b9
update keyboards/gmmk/numpad/config.h
RustedAperture Mar 21, 2023
fe67ef9
Add Keyboard Image
RustedAperture Mar 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions keyboards/gmmk/numpad/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
/* Copyright 2021 Glorious, LLC <[email protected]>
* Modified 2022 by rustedaperture for qmk_firmware
*
* 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

#define SLIDER_PIN B0
#define MIDI_ADVANCED

#define LOCKING_SUPPORT_ENABLE
#define LOCKING_RESYNC_ENABLE

#define SPI_DRIVER SPIDQ
#define SPI_SCK_PIN B3
#define SPI_MOSI_PIN B5
#define SPI_MISO_PIN B4

#define DRIVER_1_CS B12
#define DRIVER_1_EN A15
#define DRIVER_1_PW_EN B13

#define DRIVER_COUNT 1

#define RGB_MATRIX_LED_COUNT 31

#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN B6
#define WEAR_LEVELING_BACKING_SIZE 2048

#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
#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
#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
26 changes: 26 additions & 0 deletions keyboards/gmmk/numpad/halconf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/* Copyright 2021 Glorious, LLC <[email protected]>
* Modified 2022 by rustedaperture for qmk_firmware
*
* 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

#define HAL_USE_SPI TRUE
#define SPI_USE_WAIT TRUE
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
#define HAL_USE_ADC TRUE


#include_next <halconf.h>
51 changes: 51 additions & 0 deletions keyboards/gmmk/numpad/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"keyboard_name": "GMMK Numpad",
"manufacturer": "Glorious",
"url": "https://www.gloriousgaming.com/products/gmmk-numpad",
"maintainer": "GloriousThrall",
"usb": {
"vid": "0x320F",
"pid": "0x5088",
"device_version": "0.0.1"
},
"encoder": {
"rotary": [
{"pin_a": "A2", "pin_b": "A1"}
]
},
"processor": "WB32F3G71",
"bootloader": "wb32-dfu",
"diode_direction": "ROW2COL",
"matrix_pins": {
"rows": ["A3", "A4", "A5", "A6", "A7"],
"cols": ["B7", "B1", "B10", "B11"]
},
"layouts": {
"LAYOUT": {
"layout": [
{"label": "NUM", "matrix": [0, 0], "x": 0, "y": 0},
{"label": "/", "matrix": [0, 1], "x": 1, "y": 0},
{"label": "*", "matrix": [0, 2], "x": 2, "y": 0},
{"label": "-", "matrix": [0, 3], "x": 3, "y": 0},

{"label": "7", "matrix": [1, 0], "x": 0, "y": 1},
{"label": "8", "matrix": [1, 1], "x": 1, "y": 1},
{"label": "9", "matrix": [1, 2], "x": 2, "y": 1},
{"label": "+", "matrix": [1, 3], "x": 3, "y": 1, "h": 2},

{"label": "4", "matrix": [2, 0], "x": 0, "y": 2},
{"label": "5", "matrix": [2, 1], "x": 1, "y": 2},
{"label": "6", "matrix": [2, 2], "x": 2, "y": 2},
{"label": "CALC", "matrix": [2, 3], "x": 3, "y": 2},

{"label": "1", "matrix": [3, 0], "x": 0, "y": 3},
{"label": "2", "matrix": [3, 1], "x": 1, "y": 3},
{"label": "3", "matrix": [3, 2], "x": 2, "y": 3},
{"label": "RET", "matrix": [3, 3], "x": 3, "y": 3, "h": 2},

{"label": "0", "matrix": [4, 0], "x": 0, "y": 4, "w": 2},
{"label": ".", "matrix": [4, 3], "x": 3, "y": 4}
]
}
}
}
60 changes: 60 additions & 0 deletions keyboards/gmmk/numpad/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/* Copyright 2021 Glorious, LLC <[email protected]>
* Modified 2022 by rustedaperture for qmk_firmware
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
#include "analog.h"
#include "qmk_midi.h"

// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

// NUM / * -
// 7 8 9 +
// 4 5 6 ENCODER
// 1 2 3 RET
// 0 .

[0] = LAYOUT(
MO(1), KC_PSLS, KC_PAST, KC_PMNS,
KC_P7, KC_P8, KC_P9, KC_PPLS,
KC_P4, KC_P5, KC_P6, KC_CALC,
KC_P1, KC_P2, KC_P3, KC_PENT,
KC_P0, KC_PDOT
),
[1] = LAYOUT(
_______, KC_PSLS, KC_PAST, KC_PMNS,
KC_P7, RGB_VAI, KC_P9, KC_PPLS,
RGB_RMOD, KC_P5, RGB_MOD, KC_CALC,
KC_P1, RGB_VAD, KC_P3, KC_PENT,
RGB_TOG, QK_BOOT
)
};

// Potentiometer Slider, MIDI Control

uint8_t divisor = 0;

void slider(void) {
if (divisor++) { /* only run the slider function 1/256 times it's called */
return;
}
midi_send_cc(&midi_device, 2, 0x3E, 0x7F + (analogReadPin(SLIDER_PIN) >> 3));
}

void housekeeping_task_user(void) {
slider();
}
79 changes: 79 additions & 0 deletions keyboards/gmmk/numpad/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/* Copyright 2021 Glorious, LLC <[email protected]>
Modified 2022 by rustedaperture for qmk_firmware
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
#include "analog.h"
RustedAperture marked this conversation as resolved.
Show resolved Hide resolved
#include "qmk_midi.h"

// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

// NUM / * -
// 7 8 9 +
// 4 5 6 ENCODER
// 1 2 3 RET
// 0 .

[0] = LAYOUT(
MO(1), KC_PSLS, KC_PAST, KC_PMNS,
KC_P7, KC_P8, KC_P9, KC_PPLS,
KC_P4, KC_P5, KC_P6, KC_CALC,
KC_P1, KC_P2, KC_P3, KC_PENT,
KC_P0, KC_PDOT
),
[1] = LAYOUT(
_______, KC_PSLS, KC_PAST, KC_PMNS,
KC_P7, RGB_VAI, KC_P9, KC_PPLS,
RGB_RMOD, KC_P5, RGB_MOD, KC_CALC,
KC_P1, RGB_VAD, KC_P3, KC_PENT,
RGB_TOG, QK_BOOT
),
[2] = LAYOUT(
_______, _______, _______, _______,
_______, _______, _______, _______,
_______, _______, _______, _______,
_______, _______, _______, _______,
_______, _______
),
[3] = LAYOUT(
_______, _______, _______, _______,
_______, _______, _______, _______,
_______, _______, _______, _______,
_______, _______, _______, _______,
_______, _______
),
};
// clang-format on

const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[1] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[2] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[3] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }
};

// Potentiometer Slider, MIDI Control

uint8_t divisor = 0;

void slider(void) {
if (divisor++) { /* only run the slider function 1/256 times it's called */
return;
}
midi_send_cc(&midi_device, 2, 0x3E, 0x7F + (analogReadPin(SLIDER_PIN) >> 3));
}

void housekeeping_task_user(void) {
drashna marked this conversation as resolved.
Show resolved Hide resolved
slider();
}
2 changes: 2 additions & 0 deletions keyboards/gmmk/numpad/keymaps/via/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
VIA_ENABLE=yes
ENCODER_MAP_ENABLE=yes
Loading