~ruther/qmk_firmware

ddae04bca129772d74bb87a29ef65dba94fb47e9 — Leo Deng 3 years ago 91d911e
[Keyboard] add DJam keyboard (#17430)

Co-authored-by: Joel Challis <git@zvecr.com>
A keyboards/deng/djam/config.h => keyboards/deng/djam/config.h +34 -0
@@ 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

A keyboards/deng/djam/djam.c => keyboards/deng/djam/djam.c +16 -0
@@ 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"

A keyboards/deng/djam/djam.h => keyboards/deng/djam/djam.h +28 -0
@@ 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 } \
}

A keyboards/deng/djam/info.json => keyboards/deng/djam/info.json +32 -0
@@ 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 }
            ]
        }
    }
}

A keyboards/deng/djam/keymaps/default/keymap.c => keyboards/deng/djam/keymaps/default/keymap.c +23 -0
@@ 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)
};

A keyboards/deng/djam/keymaps/via/keymap.c => keyboards/deng/djam/keymaps/via/keymap.c +38 -0
@@ 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(
                 _______, _______, _______,                            _______, _______, _______,
        _______, _______, _______, _______,                            _______, _______, _______, _______,
        _______, _______,                   _______, _______, _______,                   _______, _______)
};

A keyboards/deng/djam/keymaps/via/rules.mk => keyboards/deng/djam/keymaps/via/rules.mk +1 -0
@@ 0,0 1,1 @@
VIA_ENABLE = yes

A keyboards/deng/djam/readme.md => keyboards/deng/djam/readme.md +23 -0
@@ 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.

A keyboards/deng/djam/rules.mk => keyboards/deng/djam/rules.mk +19 -0
@@ 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