diff options
| author | dbroqua <dbroqua@mousur.org> | 2017-05-07 22:56:27 +0200 |
|---|---|---|
| committer | dbroqua <dbroqua@mousur.org> | 2017-05-07 22:56:27 +0200 |
| commit | 230c70e28515d294fcad68e924f0a557a197f40a (patch) | |
| tree | 2f880de39b2e2249ae21e23290bd3147f79ac081 /keyboards/dk60 | |
| parent | 7180e195e84aabf252fcadb2852644417ac1d663 (diff) | |
| download | qmk_firmware-230c70e28515d294fcad68e924f0a557a197f40a.tar.gz qmk_firmware-230c70e28515d294fcad68e924f0a557a197f40a.zip | |
- Initial commit for branch DK60
Diffstat (limited to 'keyboards/dk60')
| -rw-r--r-- | keyboards/dk60/Makefile | 3 | ||||
| -rw-r--r-- | keyboards/dk60/config.h | 61 | ||||
| -rw-r--r-- | keyboards/dk60/dk60.c | 13 | ||||
| -rw-r--r-- | keyboards/dk60/dk60.h | 29 | ||||
| -rw-r--r-- | keyboards/dk60/keymaps/default/keymap.c | 52 | ||||
| -rw-r--r-- | keyboards/dk60/readme.md | 6 | ||||
| -rw-r--r-- | keyboards/dk60/rules.mk | 20 |
7 files changed, 184 insertions, 0 deletions
diff --git a/keyboards/dk60/Makefile b/keyboards/dk60/Makefile new file mode 100644 index 000000000..4e2a6f00f --- /dev/null +++ b/keyboards/dk60/Makefile | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | ifndef MAKEFILE_INCLUDED | ||
| 2 | include ../../Makefile | ||
| 3 | endif \ No newline at end of file | ||
diff --git a/keyboards/dk60/config.h b/keyboards/dk60/config.h new file mode 100644 index 000000000..315f4fcb1 --- /dev/null +++ b/keyboards/dk60/config.h | |||
| @@ -0,0 +1,61 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2012 Jun Wako <wakojun@gmail.com> | ||
| 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 | #ifndef CONFIG_H | ||
| 19 | #define CONFIG_H | ||
| 20 | |||
| 21 | #include "config_common.h" | ||
| 22 | |||
| 23 | /* USB Device descriptor parameter */ | ||
| 24 | #define VENDOR_ID 0xFEED | ||
| 25 | #define PRODUCT_ID 0x6060 | ||
| 26 | #define DEVICE_VER 0x0003 | ||
| 27 | #define MANUFACTURER DARKOU | ||
| 28 | #define PRODUCT DK60 | ||
| 29 | #define DESCRIPTION QMK keyboard firmware for DK60 support | ||
| 30 | |||
| 31 | /* key matrix size */ | ||
| 32 | #define MATRIX_ROWS 5 | ||
| 33 | #define MATRIX_COLS 13 | ||
| 34 | |||
| 35 | // ROWS: Top to bottom, COLS: Left to right | ||
| 36 | |||
| 37 | #define MATRIX_ROW_PINS { B6, B4, D7, D6, D4 } | ||
| 38 | #define MATRIX_COL_PINS { B0, B3, B2, B1, D3, D5, B5, B7, C6, C7, D0, D1, D2 } | ||
| 39 | #define UNUSED_PINS { F1, F4, F5, F6, F7} | ||
| 40 | |||
| 41 | /* COL2ROW or ROW2COL */ | ||
| 42 | #define DIODE_DIRECTION COL2ROW | ||
| 43 | |||
| 44 | /* Set 0 if debouncing isn't needed */ | ||
| 45 | #define DEBOUNCING_DELAY 5 | ||
| 46 | |||
| 47 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 48 | #define LOCKING_SUPPORT_ENABLE | ||
| 49 | /* Locking resynchronize hack */ | ||
| 50 | #define LOCKING_RESYNC_ENABLE | ||
| 51 | |||
| 52 | /* key combination for command */ | ||
| 53 | #define IS_COMMAND() ( \ | ||
| 54 | keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ | ||
| 55 | ) | ||
| 56 | |||
| 57 | /* Backlight configuration | ||
| 58 | */ | ||
| 59 | #define BACKLIGHT_LEVELS 4 | ||
| 60 | |||
| 61 | #endif | ||
diff --git a/keyboards/dk60/dk60.c b/keyboards/dk60/dk60.c new file mode 100644 index 000000000..40fee6f70 --- /dev/null +++ b/keyboards/dk60/dk60.c | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | #include "dk60.h" | ||
| 2 | |||
| 3 | void led_set_kb(uint8_t usb_led) { | ||
| 4 | // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here | ||
| 5 | |||
| 6 | if (usb_led & (1<<USB_LED_CAPS_LOCK)) { | ||
| 7 | dk60_caps_led_on(); | ||
| 8 | } else { | ||
| 9 | dk60_caps_led_off(); | ||
| 10 | } | ||
| 11 | |||
| 12 | led_set_user(usb_led); | ||
| 13 | } \ No newline at end of file | ||
diff --git a/keyboards/dk60/dk60.h b/keyboards/dk60/dk60.h new file mode 100644 index 000000000..cdb756114 --- /dev/null +++ b/keyboards/dk60/dk60.h | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | #ifndef DK60_H | ||
| 2 | #define DK60_H | ||
| 3 | |||
| 4 | #include "quantum.h" | ||
| 5 | #include "led.h" | ||
| 6 | |||
| 7 | inline void dk60_caps_led_on(void) { DDRE |= (1<<6); PORTE &= ~(1<<6); } | ||
| 8 | inline void dk60_esc_led_on(void) { DDRF |= (1<<0); PORTF &= ~(1<<0); } | ||
| 9 | |||
| 10 | inline void dk60_caps_led_off(void) { DDRE &= ~(1<<6); PORTE &= ~(1<<6); } | ||
| 11 | inline void dk60_esc_led_off(void) { DDRF &= ~(1<<0); PORTF &= ~(1<<0); } | ||
| 12 | |||
| 13 | #define ___ KC_TRNS | ||
| 14 | |||
| 15 | #define KEYMAP( \ | ||
| 16 | K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K4B, K4A, \ | ||
| 17 | K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K4C, \ | ||
| 18 | K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ | ||
| 19 | K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ | ||
| 20 | K41, K42, K45, K48, K49 \ | ||
| 21 | ) { \ | ||
| 22 | { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C }, \ | ||
| 23 | { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C }, \ | ||
| 24 | { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C }, \ | ||
| 25 | { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C }, \ | ||
| 26 | { ___, K41, K42, ___, ___, K45, ___, ___, K48, K49, K4A, K4B, K4C } \ | ||
| 27 | } | ||
| 28 | |||
| 29 | #endif \ No newline at end of file | ||
diff --git a/keyboards/dk60/keymaps/default/keymap.c b/keyboards/dk60/keymaps/default/keymap.c new file mode 100644 index 000000000..d670f824d --- /dev/null +++ b/keyboards/dk60/keymaps/default/keymap.c | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | #include "dk60.h" | ||
| 2 | #include "action_layer.h" | ||
| 3 | |||
| 4 | #define _DEFAULT 0 | ||
| 5 | #define _FN 1 | ||
| 6 | |||
| 7 | // Fillers to make layering more clear | ||
| 8 | #define ______ KC_TRNS | ||
| 9 | |||
| 10 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 11 | /* Qwerty gui/alt/space/alt/gui | ||
| 12 | * ,-----------------------------------------------------------------------------------------. | ||
| 13 | * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | | ||
| 14 | * |-----------------------------------------------------------------------------------------+ | ||
| 15 | * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp | | ||
| 16 | * |-----------------------------------------------------------------------------------------+ | ||
| 17 | * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter | | ||
| 18 | * |-----------------------------------------------------------------------------------------+ | ||
| 19 | * | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | FN | | ||
| 20 | * |-----------------------------------------------------------------------------------------+ | ||
| 21 | * |LGUI | LAlt | Space | RAlt |RGUI | | ||
| 22 | * `-----------------------------------------------------------------' | ||
| 23 | */ | ||
| 24 | [_DEFAULT] = KEYMAP( /* Basic QWERTY */ | ||
| 25 | KC_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_BSLS, KC_GRV, \ | ||
| 26 | 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_BSPC, \ | ||
| 27 | KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ | ||
| 28 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN), \ | ||
| 29 | KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI \ | ||
| 30 | ), | ||
| 31 | |||
| 32 | /* FN Layer | ||
| 33 | * ,-----------------------------------------------------------------------------------------. | ||
| 34 | * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del | | ||
| 35 | * |-----------------------------------------------------------------------------------------+ | ||
| 36 | * | CAPS | | | | | | | | Psc | Slck| Paus| Up | | | | ||
| 37 | * |-----------------------------------------------------------------------------------------+ | ||
| 38 | * | | Vol-| Vol+| Mute| | | * | / | Home| PgUp| Left|Right| | | ||
| 39 | * |-----------------------------------------------------------------------------------------+ | ||
| 40 | * | | Prev| Play| Next| | | + | - | End |PgDn| Down| | | | ||
| 41 | * |-----------------------------------------------------------------------------------------+ | ||
| 42 | * | | | | Stop | | | ||
| 43 | * `-----------------------------------------------------------------' | ||
| 44 | */ | ||
| 45 | [_FN] = KEYMAP( /* Layer 1 */ | ||
| 46 | ______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \ | ||
| 47 | KC_CAPS, ______, ______, ______, ______, ______, ______, ______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, ______, ______, \ | ||
| 48 | ______, KC_VOLD,KC_VOLU,KC_MUTE,______, ______, KC_PAST,KC_PSLS,KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, ______, \ | ||
| 49 | ______, KC_MPRV,KC_MPLY,KC_MNXT,______, ______, KC_PPLS,KC_PMNS,KC_END, KC_PGDN, KC_DOWN, ______, ______, \ | ||
| 50 | ______, ______, ______, KC_MSTP, ______ \ | ||
| 51 | ) | ||
| 52 | }; \ No newline at end of file | ||
diff --git a/keyboards/dk60/readme.md b/keyboards/dk60/readme.md new file mode 100644 index 000000000..82e6d0c32 --- /dev/null +++ b/keyboards/dk60/readme.md | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | DK60 keyboard firmware | ||
| 2 | ====================== | ||
| 3 | |||
| 4 | Another 60% keyboard with different HHKB layout | ||
| 5 | |||
| 6 | More information here: https://github.com/Dbroqua/MX_HHKB \ No newline at end of file | ||
diff --git a/keyboards/dk60/rules.mk b/keyboards/dk60/rules.mk new file mode 100644 index 000000000..66e9179ef --- /dev/null +++ b/keyboards/dk60/rules.mk | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | MCU = atmega32u4 | ||
| 2 | F_CPU = 16000000 | ||
| 3 | ARCH = AVR8 | ||
| 4 | F_USB = $(F_CPU) | ||
| 5 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
| 6 | OPT_DEFS += -DBOOTLOADER_SIZE=4096 | ||
| 7 | |||
| 8 | BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) | ||
| 9 | MOUSEKEY_ENABLE ?= no # Mouse keys(+4700) | ||
| 10 | EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) | ||
| 11 | CONSOLE_ENABLE ?= yes # Console for debug(+400) | ||
| 12 | COMMAND_ENABLE ?= yes # Commands for debug and configuration | ||
| 13 | NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 14 | RGBLIGHT_ENABLE ?= no # Enable keyboard underlight functionality (+4870) | ||
| 15 | BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality (+1150) | ||
| 16 | MIDI_ENABLE ?= no # MIDI controls | ||
| 17 | AUDIO_ENABLE ?= no | ||
| 18 | UNICODE_ENABLE ?= no # Unicode | ||
| 19 | BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 20 | SLEEP_LED_ENABLE ?= yes \ No newline at end of file | ||
