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

Added k3 qmk keyboard #21980

Merged
merged 22 commits into from
Dec 24, 2023
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
a2460e7
Added k3 qmk keyboard
Sep 12, 2023
b58b72c
Delete keyboards/darmoshark/k3/.gitignore
proceee Sep 12, 2023
78d16c6
Update keyboards/darmoshark/k3/info.json
proceee Sep 12, 2023
24cc5f4
Update keyboards/darmoshark/k3/keymaps/default/keymap.c
proceee Sep 12, 2023
c5bc5b2
Update keyboards/darmoshark/k3/readme.md
proceee Sep 12, 2023
85add51
Update keyboards/darmoshark/k3/readme.md
proceee Sep 12, 2023
a1a28fe
Update keyboards/darmoshark/k3/keymaps/via/keymap.c
proceee Sep 12, 2023
e8623b9
Update keyboards/darmoshark/k3/info.json
proceee Sep 12, 2023
6df5c8a
Update keyboards/darmoshark/k3/keymaps/via/keymap.c
proceee Sep 12, 2023
86c42a6
Update keyboards/darmoshark/k3/keymaps/default/keymap.c
proceee Sep 12, 2023
f60ded6
Update keyboards/darmoshark/k3/info.json
proceee Sep 12, 2023
5e501b3
Fixed code format for keymap
Sep 12, 2023
2be003b
Update keyboards/darmoshark/k3/info.json
proceee Oct 24, 2023
1f542ec
Update keyboards/darmoshark/k3/rules.mk
proceee Oct 24, 2023
9bc6908
Update keyboards/darmoshark/k3/info.json
proceee Oct 24, 2023
bd0d777
Update keyboards/darmoshark/k3/config.h
proceee Dec 23, 2023
f39b413
Update keyboards/darmoshark/k3/config.h
proceee Dec 23, 2023
00daf3a
Update keyboards/darmoshark/k3/rules.mk
proceee Dec 23, 2023
e67fc27
Update keyboards/darmoshark/k3/info.json
proceee Dec 23, 2023
510b9f0
Update keyboards/darmoshark/k3/info.json
proceee Dec 23, 2023
48446f5
Merge branch 'master' into k3
proceee Dec 23, 2023
477e018
Update keyboards/darmoshark/k3/info.json
proceee Dec 23, 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
27 changes: 27 additions & 0 deletions keyboards/darmoshark/k3/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Copyright 2023 Proceee
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

/*
* Feature disable options
* These options are also useful to firmware size reduction.
*/

/* RGB Matrix */
#define RGB_MATRIX_LED_COUNT 44
#define RGB_DISABLE_WHEN_USB_SUSPENDED
#define RGB_MATRIX_DEFAULT_VAL 80

proceee marked this conversation as resolved.
Show resolved Hide resolved
/* SPI Config for spi flash*/
#define SPI_DRIVER SPIDQ
#define SPI_SCK_PIN B3
#define SPI_MOSI_PIN B5
#define SPI_MISO_PIN B4
#define SPI_MOSI_PAL_MODE 5

#define EXTERNAL_FLASH_SPI_SLAVE_SELECT_PIN C12
#define WEAR_LEVELING_BACKING_SIZE (4 * 1024)

#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_KEYPRESSES
proceee marked this conversation as resolved.
Show resolved Hide resolved
10 changes: 10 additions & 0 deletions keyboards/darmoshark/k3/halconf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright 2023 Proceee
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

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

#include_next <halconf.h>
172 changes: 172 additions & 0 deletions keyboards/darmoshark/k3/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
{
"manufacturer": "Darmoshark",
"keyboard_name": "K3 QMK",
"maintainer": "Proceee",
"url": "",
"processor": "WB32FQ95",
"bootloader": "wb32-dfu",
"usb": {
"device_version": "1.0.0",
"vid": "0x3555",
proceee marked this conversation as resolved.
Show resolved Hide resolved
proceee marked this conversation as resolved.
Show resolved Hide resolved
"pid": "0x3667",
"suspend_wakeup_delay": 1000
},
"diode_direction": "ROW2COL",
"features": {
"bootmagic": true,
"command": false,
"console": false,
"extrakey": true,
"mousekey": true,
"nkro": true,
"rgb_matrix": true
},
proceee marked this conversation as resolved.
Show resolved Hide resolved
"matrix_pins": {
"rows": ["B13", "A1", "A2", "A3", "A4", "B7"],
"cols": ["B1", "C7", "C13", "B9"]
},
"indicators": {
"num_lock": "C5",
"on_state": 1
},
"ws2812": {
"pin": "A8"
},
"rgb_matrix": {
"driver": "ws2812",
proceee marked this conversation as resolved.
Show resolved Hide resolved
"center_point": [24, 32],
"max_brightness": 140,
"animations": {
"solid_color": true,
"alphas_mods": true,
"gradient_up_down": true,
"gradient_left_right": true,
"breathing": true,
"band_sat": true,
"band_val": true,
"band_pinwheel_sat": true,
"band_pinwheel_val": true,
"band_spiral_sat": true,
"band_spiral_val": true,
"cycle_all": true,
"cycle_left_right": true,
"cycle_up_down": true,
"cycle_out_in": true,
"cycle_out_in_dual": true,
"rainbow_moving_chevron": true,
"cycle_pinwheel": true,
"cycle_spiral": true,
"dual_beacon": true,
"rainbow_beacon": true,
"rainbow_pinwheels": true,
"raindrops": true,
"jellybean_raindrops": true,
"hue_breathing": true,
"hue_pendulum": true,
"hue_wave": true,
"pixel_fractal": true,
"pixel_flow": true,
"pixel_rain": true,
"typing_heatmap": true,
"digital_rain": true,
"solid_reactive_simple": true,
"solid_reactive": true,
"solid_reactive_wide": true,
"solid_reactive_multiwide": true,
"solid_reactive_cross": true,
"solid_reactive_multicross": true,
"solid_reactive_nexus": true,
"solid_reactive_multinexus": true,
"splash": true,
"multisplash": true,
"solid_splash": true,
"solid_multisplash": true
},
"layout": [
{ "flags": 4, "matrix":[0,2], "x": 32, "y": 0},
{ "flags": 4, "matrix":[0,3], "x": 48, "y": 0},

{ "flags": 4, "matrix":[1,3], "x": 48, "y": 13},
{ "flags": 4, "matrix":[2,3], "x": 48, "y": 26},
{ "flags": 4, "matrix":[4,3], "x": 48, "y": 51},

{ "flags": 4, "matrix":[5,2], "x": 48, "y": 64},
{ "flags": 4, "matrix":[4,2], "x": 32, "y": 51},
{ "flags": 4, "matrix":[3,2], "x": 32, "y": 38},
{ "flags": 4, "matrix":[2,2], "x": 32, "y": 26},
{ "flags": 4, "matrix":[1,2], "x": 32, "y": 13},

{ "flags": 4, "matrix":[1,1], "x": 16, "y": 13},
{ "flags": 4, "matrix":[2,1], "x": 16, "y": 26},
{ "flags": 4, "matrix":[3,1], "x": 16, "y": 38},
{ "flags": 4, "matrix":[4,1], "x": 16, "y": 51},

{ "flags": 4, "matrix":[5,1], "x": 0, "y": 64},
{ "flags": 4, "matrix":[4,0], "x": 0, "y": 51},
{ "flags": 4, "matrix":[3,0], "x": 0, "y": 38},
{ "flags": 4, "matrix":[2,0], "x": 0, "y": 26},
{ "flags": 4, "matrix":[1,0], "x": 0, "y": 13},
{ "flags": 4, "matrix":[0,0], "x": 0, "y": 0},

{ "flags": 4, "matrix":[0,1], "x": 16, "y": 0},

{ "flags": 4, "x": 224, "y": 64},
{ "flags": 4, "x": 224, "y": 64},
{ "flags": 4, "x": 224, "y": 64},
{ "flags": 4, "x": 224, "y": 64},
{ "flags": 4, "x": 224, "y": 64},
{ "flags": 4, "x": 224, "y": 64},
{ "flags": 4, "x": 224, "y": 64},
{ "flags": 4, "x": 224, "y": 64},
{ "flags": 4, "x": 224, "y": 64},
{ "flags": 4, "x": 224, "y": 64},
{ "flags": 4, "x": 224, "y": 64},
{ "flags": 4, "x": 224, "y": 64},

{ "flags": 4, "x": 224, "y": 64},
{ "flags": 4, "x": 224, "y": 64},
{ "flags": 4, "x": 224, "y": 64},
{ "flags": 4, "x": 224, "y": 64},
{ "flags": 4, "x": 224, "y": 64},
{ "flags": 4, "x": 224, "y": 64},
{ "flags": 4, "x": 224, "y": 64},
{ "flags": 4, "x": 224, "y": 64},
{ "flags": 4, "x": 224, "y": 64},
{ "flags": 4, "x": 224, "y": 64},
{ "flags": 4, "x": 224, "y": 64}
]
},
"community_layouts": ["numpad_6x4"],
"layouts": {
"LAYOUT_numpad_6x4": {
"layout": [
{ "matrix":[0,0], "x": 0, "y": 0 },
{ "matrix":[0,1], "x": 1, "y": 0 },
{ "matrix":[0,2], "x": 2, "y": 0 },
{ "matrix":[0,3], "x": 3, "y": 0 },

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

{ "matrix":[2,0], "x": 0, "y": 2 },
{ "matrix":[2,1], "x": 1, "y": 2 },
{ "matrix":[2,2], "x": 2, "y": 2 },

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

{ "matrix":[4,0], "x": 0, "y": 4 },
{ "matrix":[4,1], "x": 1, "y": 4 },
{ "matrix":[4,2], "x": 2, "y": 4 },

{ "matrix":[5,1], "x": 0, "y": 5, "w": 2 },
{ "matrix":[5,2], "x": 2, "y": 5 },
{ "matrix":[4,3], "x": 3, "y": 4, "h": 2 }
]
}
}
}
25 changes: 25 additions & 0 deletions keyboards/darmoshark/k3/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Copyright 2023 Proceee
// SPDX-License-Identifier: GPL-2.0-or-later

#include QMK_KEYBOARD_H

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

[0] = LAYOUT_numpad_6x4(
KC_ESC, KC_TAB, KC_BSPC, MO(1),
KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
KC_P7, KC_P8, KC_P9,
KC_P4, KC_P5, KC_P6, KC_PPLS,
KC_P1, KC_P2, KC_P3,
KC_P0, KC_PDOT, KC_PENT
),

[1] = LAYOUT_numpad_6x4(
EE_CLR, _______, RGB_MOD, _______,
KC_CALC, _______, _______, RGB_VAD,
_______, RGB_SPI, _______,
_______, _______, _______, RGB_VAI,
_______, RGB_SPD, _______,
_______, RGB_TOG, _______
)
};
6 changes: 6 additions & 0 deletions keyboards/darmoshark/k3/keymaps/via/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Copyright 2023 JoyLee (@itarze)
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#define DYNAMIC_KEYMAP_LAYER_COUNT 6
25 changes: 25 additions & 0 deletions keyboards/darmoshark/k3/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Copyright 2023 Proceee
// SPDX-License-Identifier: GPL-2.0-or-later

#include QMK_KEYBOARD_H

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

[0] = LAYOUT_numpad_6x4(
KC_ESC, KC_TAB, KC_BSPC, MO(1),
KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
KC_P7, KC_P8, KC_P9,
KC_P4, KC_P5, KC_P6, KC_PPLS,
KC_P1, KC_P2, KC_P3,
KC_P0, KC_PDOT, KC_PENT
),

[1] = LAYOUT_numpad_6x4(
EE_CLR, _______, RGB_MOD, _______,
KC_CALC, _______, _______, RGB_VAD,
_______, RGB_SPI, _______,
_______, _______, _______, RGB_VAI,
_______, RGB_SPD, _______,
_______, RGB_TOG, _______
)
};
1 change: 1 addition & 0 deletions keyboards/darmoshark/k3/keymaps/via/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VIA_ENABLE = yes
9 changes: 9 additions & 0 deletions keyboards/darmoshark/k3/mcuconf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Copyright 2023 Proceee
tzarc marked this conversation as resolved.
Show resolved Hide resolved
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include_next <mcuconf.h>

#undef WB32_SPI_USE_QSPI
#define WB32_SPI_USE_QSPI TRUE
23 changes: 23 additions & 0 deletions keyboards/darmoshark/k3/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# K3 QMK

* Keyboard Maintainer: [Proceee](https://github.com/Proceee)
* Hardware Supported: [Darmoshark](http://www.Darmoshark.cn)
* Hardware Availability: [Darmoshark](http://www.Darmoshark.cn)

Make example for this keyboard (after setting up your build environment):

make darmoshark/k3:default

Flashing example for this keyboard:

make darmoshark/k3:default:flash

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).

## Bootloader

Enter the bootloader in 3 ways:

* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
2 changes: 2 additions & 0 deletions keyboards/darmoshark/k3/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
EEPROM_DRIVER = wear_leveling
proceee marked this conversation as resolved.
Show resolved Hide resolved
WEAR_LEVELING_DRIVER = spi_flash
proceee marked this conversation as resolved.
Show resolved Hide resolved