aboutsummaryrefslogtreecommitdiff
path: root/keyboards/sentraq
diff options
context:
space:
mode:
authorNicholas Shaff <nick@shadedream.com>2019-02-03 21:40:42 -0600
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>2019-02-03 19:40:42 -0800
commitb6fbcd9d6210524fe73921db12209e8703c74d2d (patch)
treef7ad15a0c5f0097c896085c5bf75c5393805dde7 /keyboards/sentraq
parentc4ce613bff87eaf40c8ddd76383e3cc468e6e2a6 (diff)
downloadqmk_firmware-b6fbcd9d6210524fe73921db12209e8703c74d2d.tar.gz
qmk_firmware-b6fbcd9d6210524fe73921db12209e8703c74d2d.zip
New Keyboard: Sentraq Number Pad RGB DIY Kit (#5047)
* Added QMK Config for Sentraq Number Pad keyboard. * Sentraq Number Pad documentation cleanup. * mend * Added json for configurator. * Small documentation tweaks. * Updated the layouts to use the default layouts that match. * Uncommended user level functions in keymap, left custom keycode/macro code commented but documented why. * Switched to #pragma once from #ifndef structure in header file. * Moved Sentraq number pad to sentraq creator directory. * Renamed sentraq_number_pad to number_pad now that it's nested in the sentraq directory. * Updated references inside the files for the keyboard rename and nesting.
Diffstat (limited to 'keyboards/sentraq')
-rw-r--r--keyboards/sentraq/number_pad/config.h83
-rw-r--r--keyboards/sentraq/number_pad/info.json29
-rw-r--r--keyboards/sentraq/number_pad/keymaps/default/keymap.c105
-rw-r--r--keyboards/sentraq/number_pad/keymaps/default/readme.md1
-rw-r--r--keyboards/sentraq/number_pad/number_pad.c43
-rw-r--r--keyboards/sentraq/number_pad/number_pad.h56
-rw-r--r--keyboards/sentraq/number_pad/readme.md13
-rw-r--r--keyboards/sentraq/number_pad/rules.mk80
8 files changed, 410 insertions, 0 deletions
diff --git a/keyboards/sentraq/number_pad/config.h b/keyboards/sentraq/number_pad/config.h
new file mode 100644
index 000000000..d52670c7d
--- /dev/null
+++ b/keyboards/sentraq/number_pad/config.h
@@ -0,0 +1,83 @@
1/*
2Copyright 2019 QMK Community
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along 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 Sentraq
27#define PRODUCT Sentraq Number Pad
28#define DESCRIPTION RBG backlit number pad kit
29
30/* key matrix size */
31#define MATRIX_ROWS 5
32#define MATRIX_COLS 4
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 { F5, F0, B5, D6, D4 }
45#define MATRIX_COL_PINS { C7, D5, D1, D0 }
46#define UNUSED_PINS
47
48/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
49#define DIODE_DIRECTION COL2ROW
50
51#define BACKLIGHT_PIN B7
52// #define BACKLIGHT_BREATHING
53#define BACKLIGHT_LEVELS 3
54
55#define RGB_DI_PIN B0
56#ifdef RGB_DI_PIN
57 #define RGBLED_NUM 13
58 #define RGBLIGHT_HUE_STEP 8
59 #define RGBLIGHT_SAT_STEP 8
60 #define RGBLIGHT_VAL_STEP 8
61 #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
62 #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
63/*== all animations enable ==*/
64 #define RGBLIGHT_ANIMATIONS
65/*== or choose animations ==*/
66 #define RGBLIGHT_EFFECT_BREATHING
67 #define RGBLIGHT_EFFECT_RAINBOW_MOOD
68 #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
69 #define RGBLIGHT_EFFECT_SNAKE
70 #define RGBLIGHT_EFFECT_KNIGHT
71 #define RGBLIGHT_EFFECT_CHRISTMAS
72 #define RGBLIGHT_EFFECT_STATIC_GRADIENT
73 #define RGBLIGHT_EFFECT_RGB_TEST
74 #define RGBLIGHT_EFFECT_ALTERNATING
75#endif
76
77/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
78#define DEBOUNCING_DELAY 5
79
80/* key combination for magic key command */
81#define IS_COMMAND() ( \
82 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
83)
diff --git a/keyboards/sentraq/number_pad/info.json b/keyboards/sentraq/number_pad/info.json
new file mode 100644
index 000000000..1c6e3f53c
--- /dev/null
+++ b/keyboards/sentraq/number_pad/info.json
@@ -0,0 +1,29 @@
1{
2 "keyboard_name": "Sentraq Number Pad",
3 "maintainer": "qmk",
4 "url": "https://sentraq.com/collections/kits/products/number-pad-rgb-kit",
5 "width": 4,
6 "height": 5,
7 "layouts": {
8 "LAYOUT_numpad_5x4": {
9 "keycount": 17,
10 "layout": [
11 {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0},
12 {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1, "h":2},
13 {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2},
14 {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3, "h":2},
15 {"x":0, "y":4, "w":2}, {"x":2, "y":4}
16 ]
17 },
18 "LAYOUT_ortho_5x4": {
19 "keycount": 20,
20 "layout": [
21 {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0},
22 {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1},
23 {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2},
24 {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3},
25 {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}
26 ]
27 }
28 }
29}
diff --git a/keyboards/sentraq/number_pad/keymaps/default/keymap.c b/keyboards/sentraq/number_pad/keymaps/default/keymap.c
new file mode 100644
index 000000000..90c806a91
--- /dev/null
+++ b/keyboards/sentraq/number_pad/keymaps/default/keymap.c
@@ -0,0 +1,105 @@
1/* Copyright 2019 QMK Community
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#define _BL 0
19#define _FN 1
20
21// Defines the keycodes used by our macros in process_record_user.
22// Disabled as it isn't used in this keymap, but available for modification.
23// enum custom_keycodes {
24// QMKBEST = SAFE_RANGE,
25// QMKURL
26// };
27
28const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
29 [_BL] = LAYOUT_numpad_5x4(
30 /* Base Layer: Number Pad
31 * ,---------------.
32 * |FN | / | * | - |
33 * |---+---+---|---|
34 * | 7 | 8 | 9 | |
35 * |---+---+---| + |
36 * | 4 | 5 | 6 | |
37 * |---+---+---|---|
38 * | 1 | 2 | 3 | |
39 * |---+---+---|Ent|
40 * | 0 | . | |
41 * `---------------'
42 */
43 MO(_FN), KC_PSLS, KC_PAST, KC_PMNS, \
44 KC_P7, KC_P8, KC_P9, \
45 KC_P4, KC_P5, KC_P6, KC_PPLS, \
46 KC_P1, KC_P2, KC_P3, \
47 KC_P0, KC_PDOT, KC_PENT
48 ),
49 /* Function Layer: RGB Controls and Numlock
50 * ,---------------.
51 * |FN |TOG|M+ |M- | Mode
52 * |---+---+---|---|
53 * | |H- |H+ | | Hue
54 * |---+---+---| |
55 * | |S- |S+ | | Saturation
56 * |---+---+---|---|
57 * | |B- |B+ |NUM| Brightness
58 * |---+---+---| |
59 * | | |LCK|
60 * `---------------'
61 */
62 [_FN] = LAYOUT_numpad_5x4(
63 KC_TRNS, RGB_TOG, RGB_MOD, RGB_RMOD, \
64 KC_NO, RGB_HUD, RGB_HUI, \
65 KC_NO, RGB_SAD, RGB_SAI, KC_NO, \
66 KC_NO, RGB_VAD, RGB_VAI, \
67 KC_NO, KC_NO, KC_NLCK
68 ),
69};
70
71// Handles macros for keycodes defined above.
72// Disabled as it isn't used in this keymap, but available for modification.
73// bool process_record_user(uint16_t keycode, keyrecord_t *record) {
74// switch (keycode) {
75// case QMKBEST:
76// if (record->event.pressed) {
77// // when keycode QMKBEST is pressed
78// SEND_STRING("QMK is the best thing ever!");
79// } else {
80// // when keycode QMKBEST is released
81// }
82// break;
83// case QMKURL:
84// if (record->event.pressed) {
85// // when keycode QMKURL is pressed
86// SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
87// } else {
88// // when keycode QMKURL is released
89// }
90// break;
91// }
92// return true;
93// }
94
95void matrix_init_user(void) {
96
97}
98
99void matrix_scan_user(void) {
100
101}
102
103void led_set_user(uint8_t usb_led) {
104
105}
diff --git a/keyboards/sentraq/number_pad/keymaps/default/readme.md b/keyboards/sentraq/number_pad/keymaps/default/readme.md
new file mode 100644
index 000000000..a2c0e7567
--- /dev/null
+++ b/keyboards/sentraq/number_pad/keymaps/default/readme.md
@@ -0,0 +1 @@
# The default keymap for Sentraq Number Pad RGB DIY Kit
diff --git a/keyboards/sentraq/number_pad/number_pad.c b/keyboards/sentraq/number_pad/number_pad.c
new file mode 100644
index 000000000..8c39efac5
--- /dev/null
+++ b/keyboards/sentraq/number_pad/number_pad.c
@@ -0,0 +1,43 @@
1/* Copyright 2019 QMK Community
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 "number_pad.h"
17
18void matrix_init_kb(void) {
19 // put your keyboard start-up code here
20 // runs once when the firmware starts up
21
22 matrix_init_user();
23}
24
25void matrix_scan_kb(void) {
26 // put your looping keyboard code here
27 // runs every cycle (a lot)
28
29 matrix_scan_user();
30}
31
32bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
33 // put your per-action keyboard code here
34 // runs for every action, just before processing by the firmware
35
36 return process_record_user(keycode, record);
37}
38
39void led_set_kb(uint8_t usb_led) {
40 // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
41
42 led_set_user(usb_led);
43}
diff --git a/keyboards/sentraq/number_pad/number_pad.h b/keyboards/sentraq/number_pad/number_pad.h
new file mode 100644
index 000000000..05bcd527c
--- /dev/null
+++ b/keyboards/sentraq/number_pad/number_pad.h
@@ -0,0 +1,56 @@
1/* Copyright 2019 QMK Community
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_numpad_5x4( \
29 K00, K01, K02, K03, \
30 K10, K11, K12, \
31 K20, K21, K22, K23, \
32 K30, K31, K32, \
33 K40, K42, K43 \
34) \
35{ \
36 { K00, K01, K02, K03 }, \
37 { K10, K11, K12, KC_NO }, \
38 { K20, K21, K22, K23 }, \
39 { K30, K31, K32, KC_NO }, \
40 { K40, KC_NO, K42, K43 } \
41}
42
43#define LAYOUT_ortho_5x4( \
44 K00, K01, K02, K03, \
45 K10, K11, K12, K13, \
46 K20, K21, K22, K23, \
47 K30, K31, K32, K33, \
48 K40, K41, K42, K43 \
49) \
50{ \
51 { K00, K01, K02, K03 }, \
52 { K10, K11, K12, K13 }, \
53 { K20, K21, K22, K23 }, \
54 { K30, K31, K32, K33 }, \
55 { K40, K41, K42, K43 } \
56}
diff --git a/keyboards/sentraq/number_pad/readme.md b/keyboards/sentraq/number_pad/readme.md
new file mode 100644
index 000000000..ce9bfe435
--- /dev/null
+++ b/keyboards/sentraq/number_pad/readme.md
@@ -0,0 +1,13 @@
1# Sentraq Number Pad RGB DIY Kit
2
3Sentraq Number Pad RGB DIY Kit.
4
5Keyboard Maintainer: QMK Community\
6Hardware Supported: Sentraq Number Pad PCB\
7Hardware Availability: [Sentraq](https://sentraq.com/collections/kits/products/number-pad-rgb-kit)
8
9Make example for this keyboard (after setting up your build environment):
10
11 make sentraq/number_pad:default:dfu
12
13See 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/sentraq/number_pad/rules.mk b/keyboards/sentraq/number_pad/rules.mk
new file mode 100644
index 000000000..8678b7f88
--- /dev/null
+++ b/keyboards/sentraq/number_pad/rules.mk
@@ -0,0 +1,80 @@
1# MCU name
2MCU = atmega32u4
3
4# Processor frequency.
5# This will define a symbol, F_CPU, in all source code files equal to the
6# processor frequency in Hz. You can then use this symbol in your source code to
7# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
8# automatically to create a 32-bit value in your source code.
9#
10# This will be an integer division of F_USB below, as it is sourced by
11# F_USB after it has run through any CPU prescalers. Note that this value
12# does not *change* the processor frequency - it should merely be updated to
13# reflect the processor speed set externally so that the code can use accurate
14# software delays.
15F_CPU = 16000000
16
17
18#
19# LUFA specific
20#
21# Target architecture (see library "Board Types" documentation).
22ARCH = AVR8
23
24# Input clock frequency.
25# This will define a symbol, F_USB, in all source code files equal to the
26# input clock frequency (before any prescaling is performed) in Hz. This value may
27# differ from F_CPU if prescaling is used on the latter, and is required as the
28# raw input clock is fed directly to the PLL sections of the AVR for high speed
29# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
30# at the end, this will be done automatically to create a 32-bit value in your
31# source code.
32#
33# If no clock division is performed on the input clock inside the AVR (via the
34# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
35F_USB = $(F_CPU)
36
37# Interrupt driven control endpoint task(+60)
38OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
39
40
41# Bootloader selection
42# Teensy halfkay
43# Pro Micro caterina
44# Atmel DFU atmel-dfu
45# LUFA DFU lufa-dfu
46# QMK DFU qmk-dfu
47# atmega32a bootloadHID
48BOOTLOADER = atmel-dfu
49
50
51# If you don't know the bootloader type, then you can specify the
52# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
53# Teensy halfKay 512
54# Teensy++ halfKay 1024
55# Atmel DFU loader 4096
56# LUFA bootloader 4096
57# USBaspLoader 2048
58OPT_DEFS += -DBOOTLOADER_SIZE=4096
59
60
61# Build Options
62# change yes to no to disable
63#
64BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
65MOUSEKEY_ENABLE = no # Mouse keys(+4700)
66EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
67CONSOLE_ENABLE = yes # Console for debug(+400)
68COMMAND_ENABLE = yes # Commands for debug and configuration
69# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
70SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
71# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
72NKRO_ENABLE = no # USB Nkey Rollover
73BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
74RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
75MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
76UNICODE_ENABLE = no # Unicode
77BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
78AUDIO_ENABLE = no # Audio output on port C6
79FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
80HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)