diff options
author | Leo Deng <myst.dg@gmail.com> | 2022-07-26 14:25:28 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-25 23:25:28 -0700 |
commit | ddae04bca129772d74bb87a29ef65dba94fb47e9 (patch) | |
tree | e6c5977d22a88d0789efca54d8066dadea6d76c6 | |
parent | 91d911eb1f93dc54474be6ea976737a28ab5c1a9 (diff) | |
download | qmk_firmware-ddae04bca129772d74bb87a29ef65dba94fb47e9.tar.gz qmk_firmware-ddae04bca129772d74bb87a29ef65dba94fb47e9.zip |
[Keyboard] add DJam keyboard (#17430)
Co-authored-by: Joel Challis <git@zvecr.com>
-rw-r--r-- | keyboards/deng/djam/config.h | 34 | ||||
-rw-r--r-- | keyboards/deng/djam/djam.c | 16 | ||||
-rw-r--r-- | keyboards/deng/djam/djam.h | 28 | ||||
-rw-r--r-- | keyboards/deng/djam/info.json | 32 | ||||
-rw-r--r-- | keyboards/deng/djam/keymaps/default/keymap.c | 23 | ||||
-rw-r--r-- | keyboards/deng/djam/keymaps/via/keymap.c | 38 | ||||
-rw-r--r-- | keyboards/deng/djam/keymaps/via/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/deng/djam/readme.md | 23 | ||||
-rw-r--r-- | keyboards/deng/djam/rules.mk | 19 |
9 files changed, 214 insertions, 0 deletions
diff --git a/keyboards/deng/djam/config.h b/keyboards/deng/djam/config.h new file mode 100644 index 0000000000..b5cf1a087e --- /dev/null +++ b/keyboards/deng/djam/config.h @@ -0,0 +1,34 @@ +/* Copyright 2022 Leo Deng (@myst729) + * + * 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" + +#define VENDOR_ID 0xDE29 +#define PRODUCT_ID 0x7325 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Leo Deng +#define PRODUCT DJam + +#define MATRIX_ROWS 3 +#define MATRIX_COLS 8 +#define MATRIX_ROW_PINS { F0, F1, F4 } +#define MATRIX_COL_PINS { C7, C6, B6, B5, B4, D7, D6, D4 } +#define DIODE_DIRECTION COL2ROW +#define DEBOUNCE 5 + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_LEVELS 5 diff --git a/keyboards/deng/djam/djam.c b/keyboards/deng/djam/djam.c new file mode 100644 index 0000000000..97bfda5ac5 --- /dev/null +++ b/keyboards/deng/djam/djam.c @@ -0,0 +1,16 @@ +/* Copyright 2022 Leo Deng (@myst729) + * + * 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 "djam.h" diff --git a/keyboards/deng/djam/djam.h b/keyboards/deng/djam/djam.h new file mode 100644 index 0000000000..bf740f736a --- /dev/null +++ b/keyboards/deng/djam/djam.h @@ -0,0 +1,28 @@ +/* Copyright 2022 Leo Deng (@myst729) + * + * 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" + +#define LAYOUT( \ + K000, K001, K002, K005, K006, K007, \ + K100, K101, K102, K103, K104, K105, K106, K107, \ + K200, K201, K202, K203, K204, K205, K206 \ +) { \ + { K000, K001, K002, KC_NO, KC_NO, K005, K006, K007 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107 }, \ + { K200, K201, K202, K203, K204, K205, K206, KC_NO } \ +} diff --git a/keyboards/deng/djam/info.json b/keyboards/deng/djam/info.json new file mode 100644 index 0000000000..d940c7c2ad --- /dev/null +++ b/keyboards/deng/djam/info.json @@ -0,0 +1,32 @@ +{ + "keyboard_name": "DJam", + "url": "", + "maintainer": "myst729", + "layouts": { + "LAYOUT": { + "layout": [ + { "x": 1, "y": 0 }, + { "x": 2, "y": 0 }, + { "x": 3, "y": 0 }, + { "x": 7, "y": 0 }, + { "x": 8, "y": 0 }, + { "x": 9, "y": 0 }, + { "x": 0, "y": 0.5, "h": 2 }, + { "x": 1, "y": 1 }, + { "x": 2, "y": 1 }, + { "x": 3, "y": 1 }, + { "x": 7, "y": 1 }, + { "x": 8, "y": 1 }, + { "x": 9, "y": 1 }, + { "x": 10, "y": 0.5, "h": 2 }, + { "x": 0, "y": 3 }, + { "x": 1, "y": 3 }, + { "x": 3, "y": 3, "w": 2 }, + { "x": 5, "y": 3 }, + { "x": 6, "y": 3, "w": 2 }, + { "x": 9, "y": 3 }, + { "x": 10, "y": 3 } + ] + } + } +} diff --git a/keyboards/deng/djam/keymaps/default/keymap.c b/keyboards/deng/djam/keymaps/default/keymap.c new file mode 100644 index 0000000000..724a915e66 --- /dev/null +++ b/keyboards/deng/djam/keymaps/default/keymap.c @@ -0,0 +1,23 @@ +/* Copyright 2022 Leo Deng (@myst729) + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_S, KC_D, KC_F, KC_J, KC_K, KC_L, + KC_A, KC_Z, KC_X, KC_C, KC_N, KC_M, KC_COMM, KC_SCLN, + KC_LEFT, KC_RGHT, BL_TOGG, KC_SPC, BL_STEP, KC_UP, KC_DOWN) +}; diff --git a/keyboards/deng/djam/keymaps/via/keymap.c b/keyboards/deng/djam/keymaps/via/keymap.c new file mode 100644 index 0000000000..87ff22eb29 --- /dev/null +++ b/keyboards/deng/djam/keymaps/via/keymap.c @@ -0,0 +1,38 @@ +/* Copyright 2022 Leo Deng (@myst729) + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_S, KC_D, KC_F, KC_J, KC_K, KC_L, + KC_A, KC_Z, KC_X, KC_C, KC_N, KC_M, KC_COMM, KC_SCLN, + KC_LEFT, KC_RGHT, BL_TOGG, KC_SPC, BL_STEP, KC_UP, KC_DOWN), + + [1] = LAYOUT( + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______), + + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______), + + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______) +}; diff --git a/keyboards/deng/djam/keymaps/via/rules.mk b/keyboards/deng/djam/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/deng/djam/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/deng/djam/readme.md b/keyboards/deng/djam/readme.md new file mode 100644 index 0000000000..2af54464c0 --- /dev/null +++ b/keyboards/deng/djam/readme.md @@ -0,0 +1,23 @@ +# DJam + +![DJam](https://i.imgur.com/n95Y83h.jpeg) + +A custom controller for the music game DJMax. + +* Keyboard Maintainer: [Leo Deng](https://github.com/myst729) +* Hardware Supported: DJam controller with ATMEGA32U4 +* Hardware Availability: Private Groupbuy + +Make example for this keyboard (after setting up your build environment): + + make deng/djam:default + +Flashing example for this keyboard: + + make deng/djam: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 by pressing the button on the back of the PCB. diff --git a/keyboards/deng/djam/rules.mk b/keyboards/deng/djam/rules.mk new file mode 100644 index 0000000000..4fa3df3f58 --- /dev/null +++ b/keyboards/deng/djam/rules.mk @@ -0,0 +1,19 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +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 +NKRO_ENABLE = yes # Enable N-Key Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BACKLIGHT_DRIVER = pwm +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output |