aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorheliarmk <heliar@zju.edu.cn>2019-11-27 08:51:32 +0800
committerJames Young <18669334+noroadsleft@users.noreply.github.com>2019-11-26 16:51:32 -0800
commit2b318ba01b6e504bfe5f300f8459afc849e104b7 (patch)
tree6fdb0e2a9f3b38cde74584de1349a4c6fb0a377d
parent2f3adc3e240fcb408d89b4501d6b4cdc5fe7350a (diff)
downloadqmk_firmware-2b318ba01b6e504bfe5f300f8459afc849e104b7.tar.gz
qmk_firmware-2b318ba01b6e504bfe5f300f8459afc849e104b7.zip
[Keyboard] add keyboard wm1 (#7466)
* add new keyborad wm1 * 删除print信息 * add info.json and modified the default keymap.c * add keyboard name and maintainer in info.json * add readme.md file for new keyboard * add default/keymap/readme.md * modified the main readme file * change keyboard name from wm1 to wm1_hotswap * update readme * update imgur link in readme * update readme to add more pic and subtopic * change wm1 keyboard pic to direct show up * add copyright to config.h * modified the info.json to change the label * set the debug config to no in rule.mk * rename wn1.c wm1.h to wm1_hotswap.c, wm1_hotswap.h * fix spelling mistake * update the rule.mk to new version * fix the LED operation in wm1_hotswap.c * delete the definition of kc_trns * change layout to conform to electrical position * delete backslashes in keymap.c * update info.json according to the layout * change the return of led_update_kb * delete unused comments in rule.mk * delete unused definition in wm1_hotswap.h * add a if statement to support user override func * fix comment in rules.mk
-rw-r--r--keyboards/heliar/wm1_hotswap/config.h49
-rw-r--r--keyboards/heliar/wm1_hotswap/info.json81
-rw-r--r--keyboards/heliar/wm1_hotswap/keymaps/default/keymap.c23
-rw-r--r--keyboards/heliar/wm1_hotswap/keymaps/default/readme.md7
-rw-r--r--keyboards/heliar/wm1_hotswap/readme.md19
-rw-r--r--keyboards/heliar/wm1_hotswap/rules.mk31
-rw-r--r--keyboards/heliar/wm1_hotswap/wm1_hotswap.c39
-rw-r--r--keyboards/heliar/wm1_hotswap/wm1_hotswap.h42
8 files changed, 291 insertions, 0 deletions
diff --git a/keyboards/heliar/wm1_hotswap/config.h b/keyboards/heliar/wm1_hotswap/config.h
new file mode 100644
index 000000000..b4579ab1e
--- /dev/null
+++ b/keyboards/heliar/wm1_hotswap/config.h
@@ -0,0 +1,49 @@
1/* Copyright 2019 HELIAR MK
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19#include "config_common.h"
20
21/* USB Device descriptor parameter */
22#define VENDOR_ID 0xFEED
23#define PRODUCT_ID 0xD070
24#define DEVICE_VER 0x0001
25#define MANUFACTURER Heliar
26#define PRODUCT wm1 hotswap
27#define DESCRIPTION 69% custom keyboard
28
29/* key matrix size */
30#define MATRIX_ROWS 5
31#define MATRIX_COLS 15
32
33/*
34 * Keyboard Matrix Assignments
35 *
36 * Change this to how you wired your keyboard
37 * COLS: AVR pins used for columns, left to right
38 * ROWS: AVR pins used for rows, top to bottom
39 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
40 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
41 *
42*/
43#define MATRIX_ROW_PINS { D5, D3, B3, F0, E6 }
44#define MATRIX_COL_PINS { D2, B0, B1, B2, D1, D0, C7, C6, B6, B5, B4, F4, F5, F6, F1 }
45
46#define DIODE_DIRECTION COL2ROW
47
48#define BACKLIGHT_PIN B7
49#define BACKLIGHT_LEVELS 3 \ No newline at end of file
diff --git a/keyboards/heliar/wm1_hotswap/info.json b/keyboards/heliar/wm1_hotswap/info.json
new file mode 100644
index 000000000..512d278cf
--- /dev/null
+++ b/keyboards/heliar/wm1_hotswap/info.json
@@ -0,0 +1,81 @@
1{
2 "keyboard_name": "wm1",
3 "url": "",
4 "maintainer": "heliar",
5 "width": 18.25,
6 "height": 5.25,
7 "layouts": {
8 "LAYOUT": {
9 "layout": [
10 {"label": "k00", "x": 0, "y": 0},
11 {"label": "k01", "x": 1, "y": 0},
12 {"label": "k02", "x": 2, "y": 0},
13 {"label": "k03", "x": 3, "y": 0},
14 {"label": "k04", "x": 4, "y": 0},
15 {"label": "k05", "x": 5, "y": 0},
16 {"label": "k06", "x": 6, "y": 0},
17 {"label": "k07", "x": 9, "y": 0},
18 {"label": "k08", "x": 10, "y": 0},
19 {"label": "k09", "x": 11, "y": 0},
20 {"label": "k0a", "x": 12, "y": 0},
21 {"label": "k0b", "x": 13, "y": 0},
22 {"label": "k0c", "x": 14, "y": 0},
23 {"label": "k0d", "x": 15, "y": 0, "w": 2},
24 {"label": "k0e", "x": 17.25, "y": 0},
25 {"label": "k10", "x": 0, "y": 1, "w": 1.5},
26 {"label": "k11", "x": 1.5, "y": 1},
27 {"label": "k12", "x": 2.5, "y": 1},
28 {"label": "k13", "x": 3.5, "y": 1},
29 {"label": "k14", "x": 4.5, "y": 1},
30 {"label": "k15", "x": 5.5, "y": 1},
31 {"label": "k16", "x": 8.5, "y": 1},
32 {"label": "k17", "x": 9.5, "y": 1},
33 {"label": "k18", "x": 10.5, "y": 1},
34 {"label": "k19", "x": 11.5, "y": 1},
35 {"label": "k1a", "x": 12.5, "y": 1},
36 {"label": "k1b", "x": 13.5, "y": 1},
37 {"label": "k1c", "x": 14.5, "y": 1},
38 {"label": "k1d", "x": 15.5, "y": 1, "w": 1.5},
39 {"label": "k1e", "x": 17.25, "y": 1},
40 {"label": "k20", "x": 0, "y": 2, "w": 1.75},
41 {"label": "k21", "x": 1.75, "y": 2},
42 {"label": "k22", "x": 2.75, "y": 2},
43 {"label": "k23", "x": 3.75, "y": 2},
44 {"label": "k24", "x": 4.75, "y": 2},
45 {"label": "k25", "x": 5.75, "y": 2},
46 {"label": "k26", "x": 8.75, "y": 2},
47 {"label": "k27", "x": 9.75, "y": 2},
48 {"label": "k28", "x": 10.75, "y": 2},
49 {"label": "k29", "x": 11.75, "y": 2},
50 {"label": "k2a", "x": 12.75, "y": 2},
51 {"label": "k2b", "x": 13.75, "y": 2},
52 {"label": "k2d", "x": 14.75, "y": 2, "w": 2.25},
53 {"label": "k2e", "x": 17.25, "y": 2},
54 {"label": "k30", "x": 0, "y": 3, "w": 2.25},
55 {"label": "k31", "x": 2.25, "y": 3},
56 {"label": "k32", "x": 3.25, "y": 3},
57 {"label": "k33", "x": 4.25, "y": 3},
58 {"label": "k34", "x": 5.25, "y": 3},
59 {"label": "k35", "x": 6.25, "y": 3},
60 {"label": "k36", "x": 8.25, "y": 3},
61 {"label": "k37", "x": 9.25, "y": 3},
62 {"label": "k38", "x": 10.25, "y": 3},
63 {"label": "k39", "x": 11.25, "y": 3},
64 {"label": "k3a", "x": 12.25, "y": 3},
65 {"label": "k3b", "x": 13.25, "y": 3},
66 {"label": "k3c", "x": 14.25, "y": 3, "w": 1.75},
67 {"label": "k3d", "x": 16.25, "y": 3.25},
68 {"label": "k40", "x": 0, "y": 4, "w": 1.5},
69 {"label": "k42", "x": 3, "y": 4, "w": 1.5},
70 {"label": "k43", "x": 4.5, "y": 4},
71 {"label": "k44", "x": 5.5, "y": 4, "w": 2},
72 {"label": "k46", "x": 8.25, "y": 4, "w": 2.75},
73 {"label": "k49", "x": 11, "y": 4, "w": 1.5},
74 {"label": "k4b", "x": 13.5, "y": 4, "w": 1.5},
75 {"label": "k4c", "x": 15.25, "y": 4.25},
76 {"label": "k4d", "x": 16.25, "y": 4.25},
77 {"label": "k4e", "x": 17.25, "y": 4.25}
78 ]
79 }
80 }
81}
diff --git a/keyboards/heliar/wm1_hotswap/keymaps/default/keymap.c b/keyboards/heliar/wm1_hotswap/keymaps/default/keymap.c
new file mode 100644
index 000000000..b1cd519ae
--- /dev/null
+++ b/keyboards/heliar/wm1_hotswap/keymaps/default/keymap.c
@@ -0,0 +1,23 @@
1#include QMK_KEYBOARD_H
2
3// Defines names for use in layer keycodes and the keymap
4enum layer_names {
5 _BASE,
6 _FN
7};
8
9const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
10[_BASE] = LAYOUT(
11KC_GESC, 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_ESC,
12KC_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_INS,
13KC_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_DEL,
14KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
15KC_LCTL, KC_LALT,KC_LGUI,KC_SPC, LT(_FN,KC_SPC), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT),
16
17[_FN] = LAYOUT(
18KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______,
19RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
20_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
21_______, _______, _______, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
22_______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
23};
diff --git a/keyboards/heliar/wm1_hotswap/keymaps/default/readme.md b/keyboards/heliar/wm1_hotswap/keymaps/default/readme.md
new file mode 100644
index 000000000..d35a2c1e4
--- /dev/null
+++ b/keyboards/heliar/wm1_hotswap/keymaps/default/readme.md
@@ -0,0 +1,7 @@
1# The default layout
2## layer 0 keymap
3![Wm1 Layout Image Layer0](https://i.imgur.com/UWQzasE.png)
4## layer 1 keymap
5![Wm1 Layout Image Layer1](https://i.imgur.com/cHOefMH.png)
6## The keycap size of layout
7![Wm1 Layout Image Layout size](https://i.imgur.com/jL1EDod.png) \ No newline at end of file
diff --git a/keyboards/heliar/wm1_hotswap/readme.md b/keyboards/heliar/wm1_hotswap/readme.md
new file mode 100644
index 000000000..f6ba7e185
--- /dev/null
+++ b/keyboards/heliar/wm1_hotswap/readme.md
@@ -0,0 +1,19 @@
1# Wm1 ergonomic Keyboard alternative hotswap PCB
2### Original Wm1 Keyboard
3![Wm1 keyboard with SA Pulse](https://i.imgur.com/f0zRPTB.png)
4### Pcb front side
5![Wm1 front side of Pcb](https://i.imgur.com/2W2G3V6.jpg)
6### Pcb back side
7![Wm1 back side of Pcb](https://i.imgur.com/nGxVJGI.jpg)
8
9A ergonomic 68 key keyboard's hotswap-type PCB which is made by heliar and this PCB is compatible with the wm1 keyboard is designed by Hoq.
10
11* Keyboard Maintainer: [Heliar](https://github.com/heliarmk)
12* Hardware Supported: Hotswap type
13* Hardware Availability: [Heliar](https://github.com/heliarmk)
14
15Make example for this keyboard (after setting up your build environment):
16
17 make heliar/wm1_hotswap:default
18
19See 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).
diff --git a/keyboards/heliar/wm1_hotswap/rules.mk b/keyboards/heliar/wm1_hotswap/rules.mk
new file mode 100644
index 000000000..74214d81a
--- /dev/null
+++ b/keyboards/heliar/wm1_hotswap/rules.mk
@@ -0,0 +1,31 @@
1# MCU name
2MCU = atmega32u4
3
4# Bootloader selection
5# Teensy halfkay
6# Pro Micro caterina
7# Atmel DFU atmel-dfu
8# LUFA DFU lufa-dfu
9# QMK DFU qmk-dfu
10# ATmega32A bootloadHID
11# ATmega328P USBasp
12BOOTLOADER = atmel-dfu
13
14## Build Options
15# change yes to no to disable
16#
17BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
18MOUSEKEY_ENABLE = no # Mouse keys
19EXTRAKEY_ENABLE = yes # Audio control and System control
20CONSOLE_ENABLE = no # Console for debug
21COMMAND_ENABLE = no # Commands for debug and configuration
22# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
23SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
24# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
25NKRO_ENABLE = no # USB Nkey Rollover
26BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
27RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
28MIDI_ENABLE = no # MIDI support
29UNICODE_ENABLE = no # Unicode
30BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
31AUDIO_ENABLE = no # Audio output on port C6
diff --git a/keyboards/heliar/wm1_hotswap/wm1_hotswap.c b/keyboards/heliar/wm1_hotswap/wm1_hotswap.c
new file mode 100644
index 000000000..08f1469e3
--- /dev/null
+++ b/keyboards/heliar/wm1_hotswap/wm1_hotswap.c
@@ -0,0 +1,39 @@
1/* Copyright 2019 HELIAR MK
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include "wm1_hotswap.h"
18
19
20void keyboard_pre_init_kb(void)
21{
22 setPinOutput(D7);
23 writePinHigh(D7);
24 setPinOutput(D6);
25 writePinHigh(D6);
26 setPinOutput(D4);
27 writePinHigh(D4);
28}
29
30bool led_update_kb(led_t led_state) {
31
32 if (led_update_user(led_state)){
33 writePin(D7, !led_state.num_lock);
34 writePin(D6, !led_state.caps_lock);
35 writePin(D4, !led_state.scroll_lock);
36 }
37
38 return true;
39}
diff --git a/keyboards/heliar/wm1_hotswap/wm1_hotswap.h b/keyboards/heliar/wm1_hotswap/wm1_hotswap.h
new file mode 100644
index 000000000..295fc8097
--- /dev/null
+++ b/keyboards/heliar/wm1_hotswap/wm1_hotswap.h
@@ -0,0 +1,42 @@
1/* Copyright 2019 HELIAR MK
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#pragma once
17
18#include "quantum.h"
19
20/* This a shortcut to help you visually see your layout.
21 *
22 * The first section contains all of the arguments representing the physical
23 * layout of the board and position of the keys.
24 *
25 * The second converts the arguments into a two-dimensional array which
26 * represents the switch matrix.
27 */
28
29#define LAYOUT( \
30 K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \
31 K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \
32 K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \
33 K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \
34 K40, K42, K43, K44, K46, K49, K4B, K4C, K4D, K4E \
35)\
36{\
37 {K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E}, \
38 {K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E}, \
39 {K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E}, \
40 {K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO},\
41 {K40, KC_NO, K42, K43, K44, KC_NO,K46, KC_NO, KC_NO, K49, KC_NO, K4B, K4C, K4D, K4E} \
42}