diff options
| author | vuhopkep <boy9x0@gmail.com> | 2019-09-15 16:13:19 +0700 |
|---|---|---|
| committer | fauxpark <fauxpark@gmail.com> | 2019-09-15 19:13:19 +1000 |
| commit | 9c280089aaeb15d99773145bf05b7a1cee7a3ec2 (patch) | |
| tree | dbf708db2888279453f7fd2bddb4915841119b00 | |
| parent | 38a0a6a092aaef1c01b700a5109de98e50058bcb (diff) | |
| download | qmk_firmware-9c280089aaeb15d99773145bf05b7a1cee7a3ec2.tar.gz qmk_firmware-9c280089aaeb15d99773145bf05b7a1cee7a3ec2.zip | |
add VN66 keyboard (#6722)
* add VN66 keyboard
* update
* Update readme.md
* Update readme.md
* add hnah108 personal pcb
* delete hnah108
* Update vn66.c
| -rw-r--r-- | keyboards/vn66/config.h | 87 | ||||
| -rw-r--r-- | keyboards/vn66/info.json | 18 | ||||
| -rw-r--r-- | keyboards/vn66/keymaps/default/config.h | 19 | ||||
| -rw-r--r-- | keyboards/vn66/keymaps/default/keymap.c | 57 | ||||
| -rw-r--r-- | keyboards/vn66/keymaps/default/readme.md | 1 | ||||
| -rw-r--r-- | keyboards/vn66/readme.md | 15 | ||||
| -rw-r--r-- | keyboards/vn66/rules.mk | 45 | ||||
| -rw-r--r-- | keyboards/vn66/vn66.c | 36 | ||||
| -rw-r--r-- | keyboards/vn66/vn66.h | 70 |
9 files changed, 348 insertions, 0 deletions
diff --git a/keyboards/vn66/config.h b/keyboards/vn66/config.h new file mode 100644 index 000000000..d7281747e --- /dev/null +++ b/keyboards/vn66/config.h | |||
| @@ -0,0 +1,87 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2019 HnahKB | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #pragma once | ||
| 19 | |||
| 20 | #include "config_common.h" | ||
| 21 | |||
| 22 | /* USB Device descriptor parameter */ | ||
| 23 | #define VENDOR_ID 0xFEED | ||
| 24 | #define PRODUCT_ID 0x0000 | ||
| 25 | #define DEVICE_VER 0x0001 | ||
| 26 | #define MANUFACTURER HnahKB | ||
| 27 | #define PRODUCT VN66 | ||
| 28 | #define DESCRIPTION A compact keyboard for VNMK | ||
| 29 | |||
| 30 | /* key matrix size */ | ||
| 31 | #define MATRIX_ROWS 5 | ||
| 32 | #define MATRIX_COLS 14 | ||
| 33 | |||
| 34 | /* | ||
| 35 | * Keyboard Matrix Assignments | ||
| 36 | * | ||
| 37 | * Change this to how you wired your keyboard | ||
| 38 | * COLS: AVR pins used for columns, left to right | ||
| 39 | * ROWS: AVR pins used for rows, top to bottom | ||
| 40 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | ||
| 41 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | ||
| 42 | * | ||
| 43 | */ | ||
| 44 | #define MATRIX_ROW_PINS \ | ||
| 45 | { B1, B2, B3, D2, F7 } | ||
| 46 | #define MATRIX_COL_PINS \ | ||
| 47 | { F6, F5, F4, F1, F0, C6, C7, B5, B4, D7, D6, D4, D5, D3 } | ||
| 48 | #define UNUSED_PINS | ||
| 49 | |||
| 50 | /* COL2ROW, ROW2COL*/ | ||
| 51 | #define DIODE_DIRECTION COL2ROW | ||
| 52 | |||
| 53 | |||
| 54 | #define BACKLIGHT_PIN B6 | ||
| 55 | #define BACKLIGHT_BREATHING | ||
| 56 | #define BACKLIGHT_LEVELS 4 | ||
| 57 | |||
| 58 | #define RGB_DI_PIN E2 | ||
| 59 | #ifdef RGB_DI_PIN | ||
| 60 | #define RGBLED_NUM 20 | ||
| 61 | #define RGBLIGHT_HUE_STEP 8 | ||
| 62 | #define RGBLIGHT_SAT_STEP 8 | ||
| 63 | #define RGBLIGHT_VAL_STEP 8 | ||
| 64 | #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ | ||
| 65 | #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ | ||
| 66 | // /*== all animations enable ==*/ | ||
| 67 | #define RGBLIGHT_ANIMATIONS | ||
| 68 | #endif | ||
| 69 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
| 70 | #define DEBOUNCE 3 | ||
| 71 | |||
| 72 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ | ||
| 73 | //#define MATRIX_HAS_GHOST | ||
| 74 | |||
| 75 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 76 | #define LOCKING_SUPPORT_ENABLE | ||
| 77 | /* Locking resynchronize hack */ | ||
| 78 | #define LOCKING_RESYNC_ENABLE | ||
| 79 | |||
| 80 | /* If defined, GRAVE_ESC will always act as ESC when CTRL is held. | ||
| 81 | * This is userful for the Windows task manager shortcut (ctrl+shift+esc). | ||
| 82 | */ | ||
| 83 | #define GRAVE_ESC_CTRL_OVERRIDE | ||
| 84 | |||
| 85 | #define ENCODERS_PAD_A {B0} | ||
| 86 | #define ENCODERS_PAD_B {B7} | ||
| 87 | #define ENCODER_RESOLUTION 2 \ No newline at end of file | ||
diff --git a/keyboards/vn66/info.json b/keyboards/vn66/info.json new file mode 100644 index 000000000..214b93544 --- /dev/null +++ b/keyboards/vn66/info.json | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "vn66", | ||
| 3 | "url": "fb.com/groups/VietNamMechKey/", | ||
| 4 | "maintainer": "qmk", | ||
| 5 | "width": 19.25, | ||
| 6 | "height": 5.25, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT_all": { | ||
| 9 | "layout": [{"label":"ESC", "x":3, "y":0}, {"label":"!", "x":4, "y":0}, {"label":"@", "x":5, "y":0}, {"label":"#", "x":6, "y":0}, {"label":"$", "x":7, "y":0}, {"label":"%", "x":8, "y":0}, {"label":"^", "x":9, "y":0}, {"label":"&", "x":10, "y":0}, {"label":"*", "x":11, "y":0}, {"label":"(", "x":12, "y":0}, {"label":")", "x":13, "y":0}, {"label":"_", "x":14, "y":0}, {"label":"+", "x":15, "y":0}, {"x":16, "y":0}, {"x":17, "y":0}, {"label":"Insert", "x":18.25, "y":0}, {"label":"Tab", "x":3, "y":1, "w":1.5}, {"label":"Q", "x":4.5, "y":1}, {"label":"W", "x":5.5, "y":1}, {"label":"E", "x":6.5, "y":1}, {"label":"R", "x":7.5, "y":1}, {"label":"T", "x":8.5, "y":1}, {"label":"Y", "x":9.5, "y":1}, {"label":"U", "x":10.5, "y":1}, {"label":"I", "x":11.5, "y":1}, {"label":"O", "x":12.5, "y":1}, {"label":"P", "x":13.5, "y":1}, {"label":"{", "x":14.5, "y":1}, {"label":"}", "x":15.5, "y":1}, {"label":"Enter", "x":16.75, "y":1, "w":1.25, "h":2}, {"label":"Delete", "x":18.25, "y":1}, {"label":"Caps", "x":3, "y":2, "w":1.25}, {"label":"A", "x":4.75, "y":2}, {"label":"S", "x":5.75, "y":2}, {"label":"D", "x":6.75, "y":2}, {"label":"F", "x":7.75, "y":2}, {"label":"G", "x":8.75, "y":2}, {"label":"H", "x":9.75, "y":2}, {"label":"J", "x":10.75, "y":2}, {"label":"K", "x":11.75, "y":2}, {"label":"L", "x":12.75, "y":2}, {"label":":", "x":13.75, "y":2}, {"label":"\"", "x":14.75, "y":2}, {"x":15.75, "y":2}, {"x":3, "y":3, "w":1.25}, {"x":4.25, "y":3}, {"label":"Z", "x":5.25, "y":3}, {"label":"X", "x":6.25, "y":3}, {"label":"C", "x":7.25, "y":3}, {"label":"V", "x":8.25, "y":3}, {"label":"B", "x":9.25, "y":3}, {"label":"N", "x":10.25, "y":3}, {"label":"M", "x":11.25, "y":3}, {"label":"<", "x":12.25, "y":3}, {"label":">", "x":13.25, "y":3}, {"label":"?", "x":14.25, "y":3}, {"label":"Shift", "x":15.25, "y":3, "w":1.75}, {"label":"\u2191", "x":17.25, "y":3.25}, {"label":"Ctrl", "x":3, "y":4, "w":1.25}, {"label":"Win", "x":4.25, "y":4}, {"label":"Alt", "x":5.25, "y":4, "w":1.25}, {"x":6.5, "y":4, "w":6}, {"label":"Alt", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4}, {"label":"Menu", "x":14.75, "y":4, "w":1.25}, {"label":"\u2190", "x":16.25, "y":4.25}, {"label":"\u2193", "x":17.25, "y":4.25}, {"label":"\u2192", "x":18.25, "y":4.25}] | ||
| 10 | }, | ||
| 11 | "LAYOUT_ansi": { | ||
| 12 | "layout": [{"label":"ESC", "x":3, "y":0}, {"label":"!", "x":4, "y":0}, {"label":"@", "x":5, "y":0}, {"label":"#", "x":6, "y":0}, {"label":"$", "x":7, "y":0}, {"label":"%", "x":8, "y":0}, {"label":"^", "x":9, "y":0}, {"label":"&", "x":10, "y":0}, {"label":"*", "x":11, "y":0}, {"label":"(", "x":12, "y":0}, {"label":")", "x":13, "y":0}, {"label":"_", "x":14, "y":0}, {"label":"+", "x":15, "y":0}, {"x":16, "y":0, "w":2}, {"label":"Insert", "x":18.25, "y":0}, {"label":"Tab", "x":3, "y":1, "w":1.5}, {"label":"Q", "x":4.5, "y":1}, {"label":"W", "x":5.5, "y":1}, {"label":"E", "x":6.5, "y":1}, {"label":"R", "x":7.5, "y":1}, {"label":"T", "x":8.5, "y":1}, {"label":"Y", "x":9.5, "y":1}, {"label":"U", "x":10.5, "y":1}, {"label":"I", "x":11.5, "y":1}, {"label":"O", "x":12.5, "y":1}, {"label":"P", "x":13.5, "y":1}, {"label":"{", "x":14.5, "y":1}, {"label":"}", "x":15.5, "y":1}, {"x":16.5, "y":1, "w":1.5}, {"label":"Delete", "x":18.25, "y":1}, {"label":"Caps", "x":3, "y":2, "w":1.25}, {"label":"A", "x":4.75, "y":2}, {"label":"S", "x":5.75, "y":2}, {"label":"D", "x":6.75, "y":2}, {"label":"F", "x":7.75, "y":2}, {"label":"G", "x":8.75, "y":2}, {"label":"H", "x":9.75, "y":2}, {"label":"J", "x":10.75, "y":2}, {"label":"K", "x":11.75, "y":2}, {"label":"L", "x":12.75, "y":2}, {"label":":", "x":13.75, "y":2}, {"label":"\"", "x":14.75, "y":2}, {"label":"Enter", "x":16, "y":2, "w":2}, {"label":"Shift", "x":3, "y":3, "w":2.25}, {"label":"Z", "x":5.25, "y":3}, {"label":"X", "x":6.25, "y":3}, {"label":"C", "x":7.25, "y":3}, {"label":"V", "x":8.25, "y":3}, {"label":"B", "x":9.25, "y":3}, {"label":"N", "x":10.25, "y":3}, {"label":"M", "x":11.25, "y":3}, {"label":"<", "x":12.25, "y":3}, {"label":">", "x":13.25, "y":3}, {"label":"Shift", "x":14.25, "y":3, "w":2.75}, {"label":"\u2191", "x":17.25, "y":3.25}, {"label":"Ctrl", "x":3, "y":4, "w":1.25}, {"label":"Win", "x":4.25, "y":4, "w":1.25}, {"label":"Alt", "x":5.5, "y":4, "w":1.25}, {"x":6.75, "y":4, "w":6.25}, {"label":"Alt", "x":13, "y":4, "w":1.5}, {"label":"Ctrl", "x":14.5, "y":4, "w":1.5}, {"label":"\u2190", "x":16.25, "y":4.25}, {"label":"\u2193", "x":17.25, "y":4.25}, {"label":"\u2192", "x":18.25, "y":4.25}] | ||
| 13 | }, | ||
| 14 | "LAYOUT_iso": { | ||
| 15 | "layout": [{"label":"ESC", "x":3, "y":0}, {"label":"!", "x":4, "y":0}, {"label":"@", "x":5, "y":0}, {"label":"#", "x":6, "y":0}, {"label":"$", "x":7, "y":0}, {"label":"%", "x":8, "y":0}, {"label":"^", "x":9, "y":0}, {"label":"&", "x":10, "y":0}, {"label":"*", "x":11, "y":0}, {"label":"(", "x":12, "y":0}, {"label":")", "x":13, "y":0}, {"label":"_", "x":14, "y":0}, {"label":"+", "x":15, "y":0}, {"x":16, "y":0}, {"x":17, "y":0}, {"label":"Insert", "x":18.25, "y":0}, {"label":"Tab", "x":3, "y":1, "w":1.5}, {"label":"Q", "x":4.5, "y":1}, {"label":"W", "x":5.5, "y":1}, {"label":"E", "x":6.5, "y":1}, {"label":"R", "x":7.5, "y":1}, {"label":"T", "x":8.5, "y":1}, {"label":"Y", "x":9.5, "y":1}, {"label":"U", "x":10.5, "y":1}, {"label":"I", "x":11.5, "y":1}, {"label":"O", "x":12.5, "y":1}, {"label":"P", "x":13.5, "y":1}, {"label":"{", "x":14.5, "y":1}, {"label":"}", "x":15.5, "y":1}, {"label":"Enter", "x":16.75, "y":1, "w":1.25, "h":2}, {"label":"Delete", "x":18.25, "y":1}, {"label":"Caps", "x":3, "y":2, "w":1.25}, {"label":"A", "x":4.75, "y":2}, {"label":"S", "x":5.75, "y":2}, {"label":"D", "x":6.75, "y":2}, {"label":"F", "x":7.75, "y":2}, {"label":"G", "x":8.75, "y":2}, {"label":"H", "x":9.75, "y":2}, {"label":"J", "x":10.75, "y":2}, {"label":"K", "x":11.75, "y":2}, {"label":"L", "x":12.75, "y":2}, {"label":":", "x":13.75, "y":2}, {"label":"\"", "x":14.75, "y":2}, {"x":15.75, "y":2}, {"x":3, "y":3, "w":1.25}, {"x":4.25, "y":3}, {"label":"Z", "x":5.25, "y":3}, {"label":"X", "x":6.25, "y":3}, {"label":"C", "x":7.25, "y":3}, {"label":"V", "x":8.25, "y":3}, {"label":"B", "x":9.25, "y":3}, {"label":"N", "x":10.25, "y":3}, {"label":"M", "x":11.25, "y":3}, {"label":"<", "x":12.25, "y":3}, {"label":">", "x":13.25, "y":3}, {"label":"?", "x":14.25, "y":3}, {"label":"Shift", "x":15.25, "y":3, "w":1.75}, {"label":"\u2191", "x":17.25, "y":3.25}, {"label":"Ctrl", "x":3, "y":4, "w":1.25}, {"label":"Win", "x":4.25, "y":4}, {"label":"Alt", "x":5.25, "y":4, "w":1.25}, {"x":6.5, "y":4, "w":6}, {"label":"Alt", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4}, {"label":"Menu", "x":14.75, "y":4, "w":1.25}, {"label":"\u2190", "x":16.25, "y":4.25}, {"label":"\u2193", "x":17.25, "y":4.25}, {"label":"\u2192", "x":18.25, "y":4.25}] | ||
| 16 | } | ||
| 17 | } | ||
| 18 | } \ No newline at end of file | ||
diff --git a/keyboards/vn66/keymaps/default/config.h b/keyboards/vn66/keymaps/default/config.h new file mode 100644 index 000000000..348d7c551 --- /dev/null +++ b/keyboards/vn66/keymaps/default/config.h | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | /* Copyright 2019 HnahKB | ||
| 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 | // place overrides here | ||
diff --git a/keyboards/vn66/keymaps/default/keymap.c b/keyboards/vn66/keymaps/default/keymap.c new file mode 100644 index 000000000..df2d89512 --- /dev/null +++ b/keyboards/vn66/keymaps/default/keymap.c | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | /* Copyright 2019 HnahKB | ||
| 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 | #include QMK_KEYBOARD_H | ||
| 17 | |||
| 18 | enum hnah_layers{ | ||
| 19 | _QWERTY, | ||
| 20 | _LOWER | ||
| 21 | }; | ||
| 22 | |||
| 23 | #define LOWER MO(_LOWER) | ||
| 24 | |||
| 25 | |||
| 26 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 27 | [_QWERTY] = LAYOUT_all( /* Base */ | ||
| 28 | GRAVE_ESC, 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_DEL, KC_INS, | ||
| 29 | 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_DEL, | ||
| 30 | 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_ENT, | ||
| 31 | 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, | ||
| 32 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, LOWER, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT | ||
| 33 | ), | ||
| 34 | [_LOWER] = LAYOUT_all( /* Base */ | ||
| 35 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 36 | KC_TRNS, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 37 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 38 | KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_COMM, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 39 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
| 40 | ), | ||
| 41 | }; | ||
| 42 | |||
| 43 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
| 44 | if (clockwise == 0) { | ||
| 45 | #ifdef MOUSEKEY_ENABLE | ||
| 46 | tap_code(KC_MS_WH_DOWN); | ||
| 47 | #else | ||
| 48 | tap_code(KC_VOLD); | ||
| 49 | #endif | ||
| 50 | } else { | ||
| 51 | #ifdef MOUSEKEY_ENABLE | ||
| 52 | tap_code(KC_MS_WH_UP); | ||
| 53 | #else | ||
| 54 | tap_code(KC_VOLU); | ||
| 55 | #endif | ||
| 56 | } | ||
| 57 | } \ No newline at end of file | ||
diff --git a/keyboards/vn66/keymaps/default/readme.md b/keyboards/vn66/keymaps/default/readme.md new file mode 100644 index 000000000..5c8f558c0 --- /dev/null +++ b/keyboards/vn66/keymaps/default/readme.md | |||
| @@ -0,0 +1 @@ | |||
| # The default keymap for vn66 \ No newline at end of file | |||
diff --git a/keyboards/vn66/readme.md b/keyboards/vn66/readme.md new file mode 100644 index 000000000..0ab5b7504 --- /dev/null +++ b/keyboards/vn66/readme.md | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | # vn66 | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | A compact 60% keyboard for VNMK | ||
| 6 | |||
| 7 | Keyboard Maintainer: VNMK Community | ||
| 8 | Hardware Supported: VN66 PCB rev.2 | ||
| 9 | Hardware Availability: [https://geekhack.org/index.php?topic=101754.0] | ||
| 10 | |||
| 11 | Make example for this keyboard (after setting up your build environment): | ||
| 12 | |||
| 13 | make vn66:default | ||
| 14 | |||
| 15 | 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/vn66/rules.mk b/keyboards/vn66/rules.mk new file mode 100644 index 000000000..ad8bb587c --- /dev/null +++ b/keyboards/vn66/rules.mk | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32u4 | ||
| 3 | |||
| 4 | |||
| 5 | # Bootloader selection | ||
| 6 | # Teensy halfkay | ||
| 7 | # Pro Micro caterina | ||
| 8 | # Atmel DFU atmel-dfu | ||
| 9 | # LUFA DFU lufa-dfu | ||
| 10 | # QMK DFU qmk-dfu | ||
| 11 | # atmega32a bootloadHID | ||
| 12 | BOOTLOADER = atmel-dfu | ||
| 13 | |||
| 14 | |||
| 15 | # If you don't know the bootloader type, then you can specify the | ||
| 16 | # Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line | ||
| 17 | # Teensy halfKay 512 | ||
| 18 | # Teensy++ halfKay 1024 | ||
| 19 | # Atmel DFU loader 4096 | ||
| 20 | # LUFA bootloader 4096 | ||
| 21 | # USBaspLoader 2048 | ||
| 22 | # OPT_DEFS += -DBOOTLOADER_SIZE=4096 | ||
| 23 | |||
| 24 | |||
| 25 | # Build Options | ||
| 26 | # change yes to no to disable | ||
| 27 | # | ||
| 28 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) | ||
| 29 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | ||
| 30 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
| 31 | CONSOLE_ENABLE = yes # Console for debug(+400) | ||
| 32 | COMMAND_ENABLE = yes # Commands for debug and configuration | ||
| 33 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 34 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 35 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 36 | NKRO_ENABLE = no # USB Nkey Rollover | ||
| 37 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality | ||
| 38 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
| 39 | MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) | ||
| 40 | UNICODE_ENABLE = no # Unicode | ||
| 41 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 42 | AUDIO_ENABLE = no # Audio output on port C6 | ||
| 43 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | ||
| 44 | HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) | ||
| 45 | ENCODER_ENABLE = yes | ||
diff --git a/keyboards/vn66/vn66.c b/keyboards/vn66/vn66.c new file mode 100644 index 000000000..122047468 --- /dev/null +++ b/keyboards/vn66/vn66.c | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | /* Copyright 2019 HnahKB | ||
| 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 | #include "vn66.h" | ||
| 17 | |||
| 18 | void matrix_init_kb(void) { | ||
| 19 | led_init_ports(); | ||
| 20 | matrix_init_user(); | ||
| 21 | }; | ||
| 22 | |||
| 23 | void led_init_ports(void) { | ||
| 24 | setPinOutput(E6); | ||
| 25 | } | ||
| 26 | |||
| 27 | void led_set_kb(uint8_t usb_led) { | ||
| 28 | if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { | ||
| 29 | // Turn Caps Lock LED on | ||
| 30 | writePinLow(E6); | ||
| 31 | } else { | ||
| 32 | // Turn Caps Lock LED off | ||
| 33 | writePinHigh(E6); | ||
| 34 | } | ||
| 35 | led_set_user(usb_led); | ||
| 36 | } | ||
diff --git a/keyboards/vn66/vn66.h b/keyboards/vn66/vn66.h new file mode 100644 index 000000000..c1bb99797 --- /dev/null +++ b/keyboards/vn66/vn66.h | |||
| @@ -0,0 +1,70 @@ | |||
| 1 | /* Copyright 2019 HnahKB | ||
| 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 | #define LAYOUT_all( \ | ||
| 29 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k4d, k4c,\ | ||
| 30 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k4b,\ | ||
| 31 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ | ||
| 32 | k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ | ||
| 33 | k40, k41, k42, k44, k45, k46, k47, k48, k49, k4a \ | ||
| 34 | ) \ | ||
| 35 | { \ | ||
| 36 | { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d }, \ | ||
| 37 | { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d }, \ | ||
| 38 | { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d }, \ | ||
| 39 | { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d }, \ | ||
| 40 | { k40, k41, k42, KC_NO, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d }, \ | ||
| 41 | } | ||
| 42 | |||
| 43 | #define LAYOUT_ansi( \ | ||
| 44 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k4d, k4c,\ | ||
| 45 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k4b,\ | ||
| 46 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ | ||
| 47 | k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ | ||
| 48 | k40, k41, k42, k44, k45, k46, k47, k48, k49, k4a \ | ||
| 49 | ) LAYOUT_all( \ | ||
| 50 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k4d, k4c,\ | ||
| 51 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k4b,\ | ||
| 52 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ | ||
| 53 | k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ | ||
| 54 | k40, k41, k42, k44, k45, k46, k47, k48, k49, k4a \ | ||
| 55 | ) | ||
| 56 | |||
| 57 | #define LAYOUT_iso( \ | ||
| 58 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k4d, k4c,\ | ||
| 59 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k4b,\ | ||
| 60 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ | ||
| 61 | k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ | ||
| 62 | k40, k41, k42, k44, k45, k46, k47, k48, k49, k4a \ | ||
| 63 | ) LAYOUT_all( \ | ||
| 64 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k4d, k4c,\ | ||
| 65 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k4b,\ | ||
| 66 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ | ||
| 67 | k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ | ||
| 68 | k40, k41, k42, k44, k45, k46, k47, k48, k49, k4a \ | ||
| 69 | ) | ||
| 70 | |||
