diff options
author | heliarmk <heliar@zju.edu.cn> | 2019-11-27 08:51:32 +0800 |
---|---|---|
committer | James Young <18669334+noroadsleft@users.noreply.github.com> | 2019-11-26 16:51:32 -0800 |
commit | 2b318ba01b6e504bfe5f300f8459afc849e104b7 (patch) | |
tree | 6fdb0e2a9f3b38cde74584de1349a4c6fb0a377d /keyboards/heliar | |
parent | 2f3adc3e240fcb408d89b4501d6b4cdc5fe7350a (diff) | |
download | qmk_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
Diffstat (limited to 'keyboards/heliar')
-rw-r--r-- | keyboards/heliar/wm1_hotswap/config.h | 49 | ||||
-rw-r--r-- | keyboards/heliar/wm1_hotswap/info.json | 81 | ||||
-rw-r--r-- | keyboards/heliar/wm1_hotswap/keymaps/default/keymap.c | 23 | ||||
-rw-r--r-- | keyboards/heliar/wm1_hotswap/keymaps/default/readme.md | 7 | ||||
-rw-r--r-- | keyboards/heliar/wm1_hotswap/readme.md | 19 | ||||
-rw-r--r-- | keyboards/heliar/wm1_hotswap/rules.mk | 31 | ||||
-rw-r--r-- | keyboards/heliar/wm1_hotswap/wm1_hotswap.c | 39 | ||||
-rw-r--r-- | keyboards/heliar/wm1_hotswap/wm1_hotswap.h | 42 |
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 0000000000..b4579ab1ee --- /dev/null +++ b/keyboards/heliar/wm1_hotswap/config.h @@ -0,0 +1,49 @@ +/* Copyright 2019 HELIAR MK + * + * 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 VENDOR_ID 0xFEED +#define PRODUCT_ID 0xD070 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Heliar +#define PRODUCT wm1 hotswap +#define DESCRIPTION 69% custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D5, D3, B3, F0, E6 } +#define MATRIX_COL_PINS { D2, B0, B1, B2, D1, D0, C7, C6, B6, B5, B4, F4, F5, F6, F1 } + +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +#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 0000000000..512d278cf5 --- /dev/null +++ b/keyboards/heliar/wm1_hotswap/info.json @@ -0,0 +1,81 @@ +{ + "keyboard_name": "wm1", + "url": "", + "maintainer": "heliar", + "width": 18.25, + "height": 5.25, + "layouts": { + "LAYOUT": { + "layout": [ + {"label": "k00", "x": 0, "y": 0}, + {"label": "k01", "x": 1, "y": 0}, + {"label": "k02", "x": 2, "y": 0}, + {"label": "k03", "x": 3, "y": 0}, + {"label": "k04", "x": 4, "y": 0}, + {"label": "k05", "x": 5, "y": 0}, + {"label": "k06", "x": 6, "y": 0}, + {"label": "k07", "x": 9, "y": 0}, + {"label": "k08", "x": 10, "y": 0}, + {"label": "k09", "x": 11, "y": 0}, + {"label": "k0a", "x": 12, "y": 0}, + {"label": "k0b", "x": 13, "y": 0}, + {"label": "k0c", "x": 14, "y": 0}, + {"label": "k0d", "x": 15, "y": 0, "w": 2}, + {"label": "k0e", "x": 17.25, "y": 0}, + {"label": "k10", "x": 0, "y": 1, "w": 1.5}, + {"label": "k11", "x": 1.5, "y": 1}, + {"label": "k12", "x": 2.5, "y": 1}, + {"label": "k13", "x": 3.5, "y": 1}, + {"label": "k14", "x": 4.5, "y": 1}, + {"label": "k15", "x": 5.5, "y": 1}, + {"label": "k16", "x": 8.5, "y": 1}, + {"label": "k17", "x": 9.5, "y": 1}, + {"label": "k18", "x": 10.5, "y": 1}, + {"label": "k19", "x": 11.5, "y": 1}, + {"label": "k1a", "x": 12.5, "y": 1}, + {"label": "k1b", "x": 13.5, "y": 1}, + {"label": "k1c", "x": 14.5, "y": 1}, + {"label": "k1d", "x": 15.5, "y": 1, "w": 1.5}, + {"label": "k1e", "x": 17.25, "y": 1}, + {"label": "k20", "x": 0, "y": 2, "w": 1.75}, + {"label": "k21", "x": 1.75, "y": 2}, + {"label": "k22", "x": 2.75, "y": 2}, + {"label": "k23", "x": 3.75, "y": 2}, + {"label": "k24", "x": 4.75, "y": 2}, + {"label": "k25", "x": 5.75, "y": 2}, + {"label": "k26", "x": 8.75, "y": 2}, + {"label": "k27", "x": 9.75, "y": 2}, + {"label": "k28", "x": 10.75, "y": 2}, + {"label": "k29", "x": 11.75, "y": 2}, + {"label": "k2a", "x": 12.75, "y": 2}, + {"label": "k2b", "x": 13.75, "y": 2}, + {"label": "k2d", "x": 14.75, "y": 2, "w": 2.25}, + {"label": "k2e", "x": 17.25, "y": 2}, + {"label": "k30", "x": 0, "y": 3, "w": 2.25}, + {"label": "k31", "x": 2.25, "y": 3}, + {"label": "k32", "x": 3.25, "y": 3}, + {"label": "k33", "x": 4.25, "y": 3}, + {"label": "k34", "x": 5.25, "y": 3}, + {"label": "k35", "x": 6.25, "y": 3}, + {"label": "k36", "x": 8.25, "y": 3}, + {"label": "k37", "x": 9.25, "y": 3}, + {"label": "k38", "x": 10.25, "y": 3}, + {"label": "k39", "x": 11.25, "y": 3}, + {"label": "k3a", "x": 12.25, "y": 3}, + {"label": "k3b", "x": 13.25, "y": 3}, + {"label": "k3c", "x": 14.25, "y": 3, "w": 1.75}, + {"label": "k3d", "x": 16.25, "y": 3.25}, + {"label": "k40", "x": 0, "y": 4, "w": 1.5}, + {"label": "k42", "x": 3, "y": 4, "w": 1.5}, + {"label": "k43", "x": 4.5, "y": 4}, + {"label": "k44", "x": 5.5, "y": 4, "w": 2}, + {"label": "k46", "x": 8.25, "y": 4, "w": 2.75}, + {"label": "k49", "x": 11, "y": 4, "w": 1.5}, + {"label": "k4b", "x": 13.5, "y": 4, "w": 1.5}, + {"label": "k4c", "x": 15.25, "y": 4.25}, + {"label": "k4d", "x": 16.25, "y": 4.25}, + {"label": "k4e", "x": 17.25, "y": 4.25} + ] + } + } +} 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 0000000000..b1cd519ae5 --- /dev/null +++ b/keyboards/heliar/wm1_hotswap/keymaps/default/keymap.c @@ -0,0 +1,23 @@ +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_BASE] = LAYOUT( +KC_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, +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_INS, +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_DEL, +KC_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, +KC_LCTL, KC_LALT,KC_LGUI,KC_SPC, LT(_FN,KC_SPC), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + +[_FN] = LAYOUT( +KC_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, _______, _______, +RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; 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 0000000000..d35a2c1e4d --- /dev/null +++ b/keyboards/heliar/wm1_hotswap/keymaps/default/readme.md @@ -0,0 +1,7 @@ +# The default layout +## layer 0 keymap +![Wm1 Layout Image Layer0](https://i.imgur.com/UWQzasE.png) +## layer 1 keymap +![Wm1 Layout Image Layer1](https://i.imgur.com/cHOefMH.png) +## The keycap size of layout +![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 0000000000..f6ba7e185f --- /dev/null +++ b/keyboards/heliar/wm1_hotswap/readme.md @@ -0,0 +1,19 @@ +# Wm1 ergonomic Keyboard alternative hotswap PCB +### Original Wm1 Keyboard +![Wm1 keyboard with SA Pulse](https://i.imgur.com/f0zRPTB.png) +### Pcb front side +![Wm1 front side of Pcb](https://i.imgur.com/2W2G3V6.jpg) +### Pcb back side +![Wm1 back side of Pcb](https://i.imgur.com/nGxVJGI.jpg) + +A 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. + +* Keyboard Maintainer: [Heliar](https://github.com/heliarmk) +* Hardware Supported: Hotswap type +* Hardware Availability: [Heliar](https://github.com/heliarmk) + +Make example for this keyboard (after setting up your build environment): + + make heliar/wm1_hotswap:default + +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). diff --git a/keyboards/heliar/wm1_hotswap/rules.mk b/keyboards/heliar/wm1_hotswap/rules.mk new file mode 100644 index 0000000000..74214d81ac --- /dev/null +++ b/keyboards/heliar/wm1_hotswap/rules.mk @@ -0,0 +1,31 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +## Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_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 0000000000..08f1469e3d --- /dev/null +++ b/keyboards/heliar/wm1_hotswap/wm1_hotswap.c @@ -0,0 +1,39 @@ +/* Copyright 2019 HELIAR MK + * + * 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 "wm1_hotswap.h" + + +void keyboard_pre_init_kb(void) +{ + setPinOutput(D7); + writePinHigh(D7); + setPinOutput(D6); + writePinHigh(D6); + setPinOutput(D4); + writePinHigh(D4); +} + +bool led_update_kb(led_t led_state) { + + if (led_update_user(led_state)){ + writePin(D7, !led_state.num_lock); + writePin(D6, !led_state.caps_lock); + writePin(D4, !led_state.scroll_lock); + } + + return true; +} diff --git a/keyboards/heliar/wm1_hotswap/wm1_hotswap.h b/keyboards/heliar/wm1_hotswap/wm1_hotswap.h new file mode 100644 index 0000000000..295fc8097c --- /dev/null +++ b/keyboards/heliar/wm1_hotswap/wm1_hotswap.h @@ -0,0 +1,42 @@ +/* Copyright 2019 HELIAR MK + * + * 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" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K40, K42, K43, K44, K46, K49, K4B, K4C, K4D, K4E \ +)\ +{\ + {K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E}, \ + {K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E}, \ + {K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E}, \ + {K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO},\ + {K40, KC_NO, K42, K43, K44, KC_NO,K46, KC_NO, KC_NO, K49, KC_NO, K4B, K4C, K4D, K4E} \ +} |