aboutsummaryrefslogtreecommitdiff
path: root/keyboards/contender
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/contender')
-rw-r--r--keyboards/contender/config.h148
-rw-r--r--keyboards/contender/contender.c17
-rw-r--r--keyboards/contender/contender.h43
-rw-r--r--keyboards/contender/info.json37
-rw-r--r--keyboards/contender/keymaps/default/config.h19
-rw-r--r--keyboards/contender/keymaps/default/keymap.c111
-rw-r--r--keyboards/contender/keymaps/default/readme.md1
-rw-r--r--keyboards/contender/readme.md26
-rw-r--r--keyboards/contender/rules.mk19
9 files changed, 421 insertions, 0 deletions
diff --git a/keyboards/contender/config.h b/keyboards/contender/config.h
new file mode 100644
index 000000000..0b5e5e934
--- /dev/null
+++ b/keyboards/contender/config.h
@@ -0,0 +1,148 @@
1/*
2Copyright 2020 sotoba
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 0xC010
25#define DEVICE_VER 0x0001
26#define MANUFACTURER sotoba
27#define PRODUCT contender
28
29/* key matrix size */
30#define MATRIX_ROWS 6
31#define MATRIX_COLS 5
32
33/*
34 * Keyboard Matrix Assignments
35 *
36 * Change this to how you wired your keyboard
37 * COLS: AVR pins used for columns, left to right
38 * ROWS: AVR pins used for rows, top to bottom
39 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
40 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
41 *
42 */
43#define MATRIX_ROW_PINS { D4, D3, B5, B7, B4, B2 }
44#define MATRIX_COL_PINS { C7, D6, B3, B0, B1 }
45#define UNUSED_PINS
46
47/* COL2ROW, ROW2COL */
48#define DIODE_DIRECTION COL2ROW
49
50/*
51 * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
52 */
53#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
54
55//#define LED_NUM_LOCK_PIN B0
56//#define LED_CAPS_LOCK_PIN B1
57//#define LED_SCROLL_LOCK_PIN B2
58//#define LED_COMPOSE_PIN B3
59//#define LED_KANA_PIN B4
60
61//#define BACKLIGHT_PIN B7
62//#define BACKLIGHT_LEVELS 3
63//#define BACKLIGHT_BREATHING
64
65#define RGB_DI_PIN C6
66#define RGBLED_NUM 33
67#define RGBLIGHT_LED_MAP { \
68 0, 1, 2, 3, \
69 7, 6, 5, 4, \
70 8, 9, 10, 11, \
71 15, 14, 13, 12, \
72 16, 17, 18, 19, \
73 22, 21, 20, \
74 25, 24, 23, 26, 27, 28, 29, 30, 31, 32 }
75#define RGBLIGHT_HUE_STEP 8
76#define RGBLIGHT_SAT_STEP 8
77#define RGBLIGHT_VAL_STEP 8
78#define RGBLIGHT_LIMIT_VAL 32 /* The maximum brightness level */
79#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
80#define RGBLIGHT_EFFECT_BREATHING
81#define RGBLIGHT_EFFECT_RAINBOW_MOOD
82#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
83#define RGBLIGHT_EFFECT_SNAKE
84#define RGBLIGHT_EFFECT_KNIGHT
85#define RGBLIGHT_EFFECT_STATIC_GRADIENT
86#define RGBLIGHT_EFFECT_RGB_TEST
87#define RGBLIGHT_EFFECT_ALTERNATING
88
89/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
90#define DEBOUNCE 5
91
92/* define if matrix has ghost (lacks anti-ghosting diodes) */
93//#define MATRIX_HAS_GHOST
94
95/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
96#define LOCKING_SUPPORT_ENABLE
97/* Locking resynchronize hack */
98#define LOCKING_RESYNC_ENABLE
99
100/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
101 * This is useful for the Windows task manager shortcut (ctrl+shift+esc).
102 */
103//#define GRAVE_ESC_CTRL_OVERRIDE
104
105/*
106 * Force NKRO
107 *
108 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
109 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
110 * makefile for this to work.)
111 *
112 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
113 * until the next keyboard reset.
114 *
115 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
116 * fully operational during normal computer usage.
117 *
118 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
119 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
120 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
121 * power-up.
122 *
123 */
124//#define FORCE_NKRO
125
126/*
127 * Feature disable options
128 * These options are also useful to firmware size reduction.
129 */
130
131/* disable debug print */
132//#define NO_DEBUG
133
134/* disable print */
135//#define NO_PRINT
136
137/* disable action features */
138//#define NO_ACTION_LAYER
139//#define NO_ACTION_TAPPING
140//#define NO_ACTION_ONESHOT
141
142/* disable these deprecated features by default */
143#define NO_ACTION_MACRO
144#define NO_ACTION_FUNCTION
145
146/* Bootmagic Lite key configuration */
147//#define BOOTMAGIC_LITE_ROW 0
148//#define BOOTMAGIC_LITE_COLUMN 0
diff --git a/keyboards/contender/contender.c b/keyboards/contender/contender.c
new file mode 100644
index 000000000..5e0051620
--- /dev/null
+++ b/keyboards/contender/contender.c
@@ -0,0 +1,17 @@
1/* Copyright 2020 sotoba
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
17#include "contender.h"
diff --git a/keyboards/contender/contender.h b/keyboards/contender/contender.h
new file mode 100644
index 000000000..4dd71a5d2
--- /dev/null
+++ b/keyboards/contender/contender.h
@@ -0,0 +1,43 @@
1/* Copyright 2020 sotoba
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
17#pragma once
18
19#include "quantum.h"
20
21/* This is a shortcut to help you visually see your layout.
22 *
23 * The first section contains all of the arguments representing the physical
24 * layout of the board and position of the keys.
25 *
26 * The second converts the arguments into a two-dimensional array which
27 * represents the switch matrix.
28 */
29#define LAYOUT( \
30 k00, k01, k02, k03, \
31 k10, k11, k12, k13, \
32 k20, k21, k22, k23, \
33 k30, k31, k32, k33, k34, \
34 k40, k41, k42, k43, k44, \
35 k50, k51, k52, k53 \
36) { \
37 { KC_NO, k00, k01, k02, k03 }, \
38 { KC_NO, k10, k11, k12, k13 }, \
39 { KC_NO, k20, k21, k22, k23 }, \
40 { k30, k31, k32, k33, k34 }, \
41 { k40, k41, k42, k43, k44 }, \
42 { k50, k51, k52, k53, KC_NO } \
43}
diff --git a/keyboards/contender/info.json b/keyboards/contender/info.json
new file mode 100644
index 000000000..1f1d8bf53
--- /dev/null
+++ b/keyboards/contender/info.json
@@ -0,0 +1,37 @@
1{
2 "keyboard_name": "contender",
3 "url": "https://github.com/sotoba/contender",
4 "maintainer": "sotoba",
5 "layouts": {
6 "LAYOUT": {
7 "layout": [
8 {"label":"Esc", "x":1, "y":0},
9 {"label":"Tab", "x":2, "y":0},
10 {"label":"Shift", "x":3, "y":0},
11 {"label":"Back", "x":4, "y":0},
12 {"label":"Num", "x":1, "y":1.25},
13 {"label":"/", "x":2, "y":1.25},
14 {"label":"*", "x":3, "y":1.25},
15 {"label":"=", "x":4, "y":1.25},
16 {"label":"7", "x":1, "y":2.25},
17 {"label":"8", "x":2, "y":2.25},
18 {"label":"9", "x":3, "y":2.25},
19 {"label":"-", "x":4, "y":2.25},
20 {"label":"fn","x":0, "y":3.25},
21 {"label":"4", "x":1, "y":3.25},
22 {"label":"5", "x":2, "y":3.25},
23 {"label":"6", "x":3, "y":3.25},
24 {"label":"+", "x":4, "y":3.25},
25 {"label":"RGB","x":0, "y":4.25},
26 {"label":"1", "x":1, "y":4.25},
27 {"label":"2", "x":2, "y":4.25},
28 {"label":"3", "x":3, "y":4.25},
29 {"label":"Enter", "x":4, "y":4.25, "h":2},
30 {"label":"TG","x":0, "y":5.25},
31 {"label":"0", "x":1, "y":5.25},
32 {"label":"00", "x":2, "y":5.25},
33 {"label":".", "x":3, "y":5.25}
34 ]
35 }
36 }
37}
diff --git a/keyboards/contender/keymaps/default/config.h b/keyboards/contender/keymaps/default/config.h
new file mode 100644
index 000000000..c68cb99f3
--- /dev/null
+++ b/keyboards/contender/keymaps/default/config.h
@@ -0,0 +1,19 @@
1/*
2Copyright 2020 sotoba
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#define RGBLIGHT_LAYERS
19#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF
diff --git a/keyboards/contender/keymaps/default/keymap.c b/keyboards/contender/keymaps/default/keymap.c
new file mode 100644
index 000000000..7784c7d59
--- /dev/null
+++ b/keyboards/contender/keymaps/default/keymap.c
@@ -0,0 +1,111 @@
1/* Copyright 2020 sotoba
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// Defines names for use in layer keycodes and the keymap
19enum layer_names {
20 _BASE,
21 _UNRULY,
22 _FUNCTION
23};
24
25// Defines the keycodes used by our macros in process_record_user
26enum custom_keycodes {
27 DOUBLE_ZERO = SAFE_RANGE
28};
29
30const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
31 /* Base */
32 [_BASE] = LAYOUT(
33 KC_ESCAPE, KC_LSFT, KC_TAB, KC_BSPACE,
34 KC_NLCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_EQUAL,
35 KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_MINUS,
36 MO(_FUNCTION), KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_PLUS,
37 RGB_TOG, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER,
38 TG(_UNRULY), KC_KP_0, DOUBLE_ZERO, KC_KP_DOT
39 ),
40 /* Lightning */
41 [_UNRULY] = LAYOUT(
42 KC_ESCAPE, KC_LSFT, KC_TAB, KC_BSPACE,
43 KC_NLCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_EQUAL,
44 KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_MINUS,
45 KC_TRNS, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_PLUS,
46 KC_TRNS, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER,
47 KC_TRNS, KC_KP_0, DOUBLE_ZERO, KC_KP_DOT
48 ),
49 /* Function */
50 [_FUNCTION] = LAYOUT(
51 RESET, KC_NO, KC_NO, KC_NO,
52 KC_NO, KC_NO, KC_NO, KC_NO,
53 KC_NO, KC_NO, KC_NO, KC_NO,
54 KC_TRNS, RGB_RMOD, RGB_MOD, KC_NO, KC_NO,
55 KC_TRNS, RGB_HUI, RGB_SAI, RGB_VAI, KC_NO,
56 KC_TRNS, RGB_HUD, RGB_SAD, RGB_VAD
57 )
58};
59
60bool process_record_user(uint16_t keycode, keyrecord_t *record) {
61 switch (keycode) {
62 case DOUBLE_ZERO:
63 if (record->event.pressed) {
64 // when keycode DOUBLE_ZERO is pressed
65 SEND_STRING("00");
66 }
67 break;
68 }
69 return true;
70}
71
72#ifdef RGBLIGHT_LAYERS
73const rgblight_segment_t PROGMEM num_layer[] = RGBLIGHT_LAYER_SEGMENTS(
74 {26, 7, HSV_SPRINGGREEN}
75);
76
77const rgblight_segment_t PROGMEM unruly_layer[] = RGBLIGHT_LAYER_SEGMENTS(
78 {0, 4, HSV_OFF},
79 {4, 2, HSV_WHITE},
80 {6, 2, HSV_PURPLE},
81 {8, 2, HSV_RED},
82 {10, 2, HSV_BLUE},
83 {12, 2, HSV_YELLOW},
84 {14, 2, HSV_GREEN},
85 {16, 3, HSV_ORANGE},
86 {19, 1, HSV_OFF},
87 {20, 3, HSV_PINK},
88 {23, 10, HSV_GREEN}
89);
90
91const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST(
92 num_layer,
93 unruly_layer
94);
95
96void keyboard_post_init_user(void) {
97 // Enable the LED layers
98 rgblight_layers = rgb_layers;
99}
100
101layer_state_t layer_state_set_user(layer_state_t state) {
102 rgblight_set_layer_state(1, layer_state_cmp(state, _UNRULY));
103 return state;
104}
105
106bool led_update_user(led_t led_state) {
107 rgblight_set_layer_state(0, led_state.num_lock);
108 return true;
109}
110
111#endif
diff --git a/keyboards/contender/keymaps/default/readme.md b/keyboards/contender/keymaps/default/readme.md
new file mode 100644
index 000000000..b623b296d
--- /dev/null
+++ b/keyboards/contender/keymaps/default/readme.md
@@ -0,0 +1 @@
# The default keymap for contender
diff --git a/keyboards/contender/readme.md b/keyboards/contender/readme.md
new file mode 100644
index 000000000..281ad4dab
--- /dev/null
+++ b/keyboards/contender/readme.md
@@ -0,0 +1,26 @@
1# contender
2
3![](https://i.imgur.com/JME6nwB.jpg)
4
5A number pad for hardboot.
6
7* Keyboard Maintainer: [sotoba](https://github.com/sotoba)
8* Hardware Supported: Contender PCB
9* Hardware Availability: [BOOTH: stupa-devices](https://stupa-devices.booth.pm/)
10
11Make example for this keyboard (after setting up your build environment):
12
13 make contender:default
14
15Flashing example for this keyboard:
16
17 make contender:default:flash
18
19See 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).
20
21## Bootloader
22
23Enter the bootloader in 2 ways:
24
25* **Physical reset button**: Briefly press the button on the back of the PCB
26* **Keycode in layout**: Press the key mapped to `RESET` if it is available
diff --git a/keyboards/contender/rules.mk b/keyboards/contender/rules.mk
new file mode 100644
index 000000000..72c7f6b2f
--- /dev/null
+++ b/keyboards/contender/rules.mk
@@ -0,0 +1,19 @@
1# MCU name
2MCU = atmega32u2
3
4# Bootloader selection
5BOOTLOADER = atmel-dfu
6
7# Build Options
8# change yes to no to disable
9#
10BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
11MOUSEKEY_ENABLE = yes # Mouse keys
12EXTRAKEY_ENABLE = yes # Audio control and System control
13CONSOLE_ENABLE = no # Console for debug
14COMMAND_ENABLE = no # Commands for debug and configuration
15# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
16NKRO_ENABLE = no # USB Nkey Rollover
17BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
18RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
19AUDIO_ENABLE = no # Audio output