Skip to content

Commit

Permalink
[Keyboard] Add ReverseStudio-DecadePad (qmk#8553)
Browse files Browse the repository at this point in the history
* ADD DecadePad

* Fix Key display bug

* fix

* firmware1

THIS IS A Backup commit

* firmware2

* rename all fill with lower case

* fix bug

* Final Version

Fix all bugs

* Requested change apply

* suggested apply

* change apply

* via test

* Apply change and fix via support problem
  • Loading branch information
huajijam authored and HokieGeek committed Apr 10, 2020
1 parent 8e23b7b commit 9cee28e
Show file tree
Hide file tree
Showing 9 changed files with 247 additions and 0 deletions.
81 changes: 81 additions & 0 deletions keyboards/reversestudio/decadepad/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/*
Copyright 2012 Jun Wako <wakojun@gmail.com>
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 0x5253
#define PRODUCT_ID 0x4450
#define DEVICE_VER 0x0001
#define MANUFACTURER ReverseStudio
#define PRODUCT DecadePad
#define DESCRIPTION 6x4Pad

/* key matrix size */
#define MATRIX_ROWS 6
#define MATRIX_COLS 4

/* NIU Mini PCB default pin-out */
#define MATRIX_ROW_PINS { F0, F1, F4, F5, F6, F7 }
#define MATRIX_COL_PINS { D0, D1, D2, D3 }
#define UNUSED_PINS

/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW

/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST

/* number of backlight levels */
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5

/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE

/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE

#define RGB_DI_PIN D5
#ifdef RGB_DI_PIN
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 20
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#endif

/*
* Feature disable options
* These options are also useful to firmware size reduction.
*/

/* disable debug print */
//#define NO_DEBUG

/* disable print */
//#define NO_PRINT

/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
7 changes: 7 additions & 0 deletions keyboards/reversestudio/decadepad/decadepad.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include "decadepad.h"
bool led_update_kb(led_t led_state) {
if (led_update_user(led_state)){
writePin(D4, led_state.num_lock);
}
return true;
}
19 changes: 19 additions & 0 deletions keyboards/reversestudio/decadepad/decadepad.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#pragma once

#include "quantum.h"
#define LAYOUT_numpad_6x4( \
k01, k02, k03, k04, \
k11, k12, k13, k14, \
k21, k22, k23, \
k31, k32, k33, k34, \
k41, k42, k43, \
k51, k53, k54 \
) \
{ \
{ k01, k02, k03, k04 }, \
{ k11, k12, k13, k14 }, \
{ k21, k22, k23, KC_NO }, \
{ k31, k32, k33, k34 }, \
{ k41, k42, k43, KC_NO }, \
{ k51, KC_NO, k53, k54 }, \
}
40 changes: 40 additions & 0 deletions keyboards/reversestudio/decadepad/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"keyboard_name": "DecadePad",
"url": "",
"maintainer": "huajijam",
"width": 6,
"height": 4,
"layouts": {
"LAYOUT_numpad_6x4": {
"key_count": 21,
"layout": [
{"x":0, "y":0},
{"x":1, "y":0},
{"x":2, "y":0},
{"x":3, "y":0},

{"x":0, "y":1},
{"x":1, "y":1},
{"x":2, "y":1},
{"x":3, "y":1},

{"x":0, "y":2},
{"x":1, "y":2},
{"x":2, "y":2},

{"x":0, "y":3},
{"x":1, "y":3},
{"x":2, "y":3},
{"x":3, "y":2, "h":2},

{"x":0, "y":4},
{"x":1, "y":4},
{"x":2, "y":4},

{"x":0, "y":5, "w":2},
{"x":2, "y":5},
{"x":3, "y":4, "h":2}
]
}
}
}
12 changes: 12 additions & 0 deletions keyboards/reversestudio/decadepad/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include QMK_KEYBOARD_H

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_numpad_6x4(
RGB_TOG, RGB_MOD, RGB_VAI, RGB_M_R,
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
KC_P7, KC_P8, KC_P9,
KC_P4, KC_P5, KC_P6, KC_PPLS,
KC_P1, KC_P2, KC_P3,
KC_P0, KC_PDOT, KC_PENT
)
};
36 changes: 36 additions & 0 deletions keyboards/reversestudio/decadepad/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#include QMK_KEYBOARD_H

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_numpad_6x4(
RGB_TOG, RGB_MOD, RGB_VAI, RGB_M_R,
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
KC_P7, KC_P8, KC_P9,
KC_P4, KC_P5, KC_P6, KC_PPLS,
KC_P1, KC_P2, KC_P3,
KC_P0, KC_PDOT, KC_PENT
),
[1] = LAYOUT_numpad_6x4(
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, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS
),
[2] = LAYOUT_numpad_6x4(
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, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS
),
[3] = LAYOUT_numpad_6x4(
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, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS
)
};
2 changes: 2 additions & 0 deletions keyboards/reversestudio/decadepad/keymaps/via/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
VIA_ENABLE = yes
MOUSEKEY_ENABLE = no
12 changes: 12 additions & 0 deletions keyboards/reversestudio/decadepad/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# DecadePad

A 6x4 Standard Numpad

* Keyboard Maintainer: [huajijam](https://github.com/huajijam)
* Hardware Supported: DecadePad

Make example for this keyboard (after setting up your build environment):

make reversestudio/decadepad: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).
38 changes: 38 additions & 0 deletions keyboards/reversestudio/decadepad/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# 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 = yes # Virtual DIP switch configuration
MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = yes # 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 = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
MIDI_ENABLE = no # MIDI support
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
UNICODE_ENABLE = yes # Unicode

# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend

LAYOUTS = numpad_6x4

0 comments on commit 9cee28e

Please sign in to comment.