aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreasureTypes <73436366+TreasureTypes@users.noreply.github.com>2021-07-29 18:50:05 +0200
committerGitHub <noreply@github.com>2021-07-29 09:50:05 -0700
commit5a0985aa4a10ae15d3c3eb49a0394b10a62160ae (patch)
tree99e65df2d213ebdc7be568ed3bdee1f320c30b7b
parentaa0b7079a4a7a3174c7f078fc5fa81e630df1775 (diff)
downloadqmk_firmware-5a0985aa4a10ae15d3c3eb49a0394b10a62160ae.tar.gz
qmk_firmware-5a0985aa4a10ae15d3c3eb49a0394b10a62160ae.zip
[Keyboard] Add Treasure TYPE-9 Series II (#13725)
Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: Drashna Jaelre <drashna@live.com>
-rw-r--r--keyboards/treasure/type9s2/config.h50
-rw-r--r--keyboards/treasure/type9s2/info.json22
-rw-r--r--keyboards/treasure/type9s2/keymaps/default/keymap.c43
-rw-r--r--keyboards/treasure/type9s2/keymaps/default/readme.md1
-rw-r--r--keyboards/treasure/type9s2/keymaps/via/keymap.c43
-rw-r--r--keyboards/treasure/type9s2/keymaps/via/readme.md1
-rw-r--r--keyboards/treasure/type9s2/keymaps/via/rules.mk1
-rw-r--r--keyboards/treasure/type9s2/readme.md17
-rw-r--r--keyboards/treasure/type9s2/rules.mk23
-rw-r--r--keyboards/treasure/type9s2/type9s2.c16
-rw-r--r--keyboards/treasure/type9s2/type9s2.h29
11 files changed, 246 insertions, 0 deletions
diff --git a/keyboards/treasure/type9s2/config.h b/keyboards/treasure/type9s2/config.h
new file mode 100644
index 000000000..a9d73f961
--- /dev/null
+++ b/keyboards/treasure/type9s2/config.h
@@ -0,0 +1,50 @@
1/* Copyright 2021 Treasure
2
3This program is free software: you can redistribute it and/or modify
4it under the terms of the GNU General Public License as published by
5the Free Software Foundation, either version 2 of the License, or
6(at your option) any later version.
7
8This program is distributed in the hope that it will be useful,
9but WITHOUT ANY WARRANTY; without even the implied warranty of
10MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11GNU General Public License for more details.
12
13You should have received a copy of the GNU General Public License
14along with this program. If not, see <http://www.gnu.org/licenses/>.
15*/
16
17#pragma once
18
19#include "config_common.h"
20
21/* USB Device descriptor parameter */
22#define VENDOR_ID 0x5452
23#define PRODUCT_ID 0x5492
24#define DEVICE_VER 0x0001
25#define MANUFACTURER TREASURE
26#define PRODUCT TYPE-9 Series II
27
28/* key matrix size */
29#define MATRIX_ROWS 3
30#define MATRIX_COLS 3
31
32/* Keyboard Matrix Assignments*/
33#define MATRIX_ROW_PINS { B4, B5, D2 }
34#define MATRIX_COL_PINS { B2, B3, C5 }
35#define UNUSED_PINS
36
37/* COL2ROW, ROW2COL*/
38#define DIODE_DIRECTION COL2ROW
39
40#define BACKLIGHT_PIN B7
41
42/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
43#define DEBOUNCE 5
44
45/* define if matrix has ghost (lacks anti-ghosting diodes) */
46//#define MATRIX_HAS_GHOST
47
48/* number of backlight levels */
49#define BACKLIGHT_LEVELS 3
50
diff --git a/keyboards/treasure/type9s2/info.json b/keyboards/treasure/type9s2/info.json
new file mode 100644
index 000000000..5991a22ef
--- /dev/null
+++ b/keyboards/treasure/type9s2/info.json
@@ -0,0 +1,22 @@
1{
2 "keyboard_name": "Treasure TYPE-9 Series II",
3 "url": "http://treasuretypes.com",
4 "maintainer": "Treasure",
5 "width": 3,
6 "height": 3,
7 "layouts": {
8 "LAYOUT_ortho_3x3": {
9 "layout": [
10 {"label": "7", "x": 0, "y": 0},
11 {"label": "8", "x": 1, "y": 0},
12 {"label": "9", "x": 2, "y": 0},
13 {"label": "4", "x": 0, "y": 1},
14 {"label": "5", "x": 1, "y": 1},
15 {"label": "6", "x": 2, "y": 1},
16 {"label": "1", "x": 0, "y": 2},
17 {"label": "2", "x": 1, "y": 2},
18 {"label": "3", "x": 2, "y": 2}
19 ]
20 }
21 }
22}
diff --git a/keyboards/treasure/type9s2/keymaps/default/keymap.c b/keyboards/treasure/type9s2/keymaps/default/keymap.c
new file mode 100644
index 000000000..35e789a95
--- /dev/null
+++ b/keyboards/treasure/type9s2/keymaps/default/keymap.c
@@ -0,0 +1,43 @@
1/* Copyright 2021 Treasure
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 QMK_KEYBOARD_H
18
19const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20 [0] = LAYOUT_ortho_3x3(
21 MO(1), KC_MPLY, BL_STEP,
22 KC_VOLD, KC_MUTE, KC_VOLU,
23 KC_KP_1, KC_KP_2, KC_KP_3
24 ),
25
26 [1] = LAYOUT_ortho_3x3(
27 _______, _______, MO(2),
28 _______, _______, _______,
29 _______, _______, _______
30 ),
31
32 [2] = LAYOUT_ortho_3x3(
33 _______, _______, _______,
34 _______, _______, _______,
35 _______, _______, MO(3)
36 ),
37
38 [3] = LAYOUT_ortho_3x3(
39 _______, _______, _______,
40 _______, _______, _______,
41 RESET, _______, _______
42 )
43};
diff --git a/keyboards/treasure/type9s2/keymaps/default/readme.md b/keyboards/treasure/type9s2/keymaps/default/readme.md
new file mode 100644
index 000000000..76778b088
--- /dev/null
+++ b/keyboards/treasure/type9s2/keymaps/default/readme.md
@@ -0,0 +1 @@
# The default keymap for Type-9 Series II
diff --git a/keyboards/treasure/type9s2/keymaps/via/keymap.c b/keyboards/treasure/type9s2/keymaps/via/keymap.c
new file mode 100644
index 000000000..a3e959a9f
--- /dev/null
+++ b/keyboards/treasure/type9s2/keymaps/via/keymap.c
@@ -0,0 +1,43 @@
1/* Copyright 2021 Treasure
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 QMK_KEYBOARD_H
18
19const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20 [0] = LAYOUT_ortho_3x3(
21 KC_KP_7, KC_KP_8, KC_KP_9,
22 KC_KP_4, LT(1, KC_KP_5), KC_KP_6,
23 KC_KP_1, KC_KP_2, KC_KP_3
24 ),
25
26 [1] = LAYOUT_ortho_3x3(
27 _______, _______, _______,
28 _______, _______, _______,
29 _______, _______, _______
30 ),
31
32 [2] = LAYOUT_ortho_3x3(
33 _______, _______, _______,
34 _______, _______, _______,
35 _______, _______, _______
36 ),
37
38 [3] = LAYOUT_ortho_3x3(
39 _______, _______, _______,
40 _______, _______, _______,
41 _______, _______, _______
42 )
43};
diff --git a/keyboards/treasure/type9s2/keymaps/via/readme.md b/keyboards/treasure/type9s2/keymaps/via/readme.md
new file mode 100644
index 000000000..76778b088
--- /dev/null
+++ b/keyboards/treasure/type9s2/keymaps/via/readme.md
@@ -0,0 +1 @@
# The default keymap for Type-9 Series II
diff --git a/keyboards/treasure/type9s2/keymaps/via/rules.mk b/keyboards/treasure/type9s2/keymaps/via/rules.mk
new file mode 100644
index 000000000..1e5b99807
--- /dev/null
+++ b/keyboards/treasure/type9s2/keymaps/via/rules.mk
@@ -0,0 +1 @@
VIA_ENABLE = yes
diff --git a/keyboards/treasure/type9s2/readme.md b/keyboards/treasure/type9s2/readme.md
new file mode 100644
index 000000000..2985778f4
--- /dev/null
+++ b/keyboards/treasure/type9s2/readme.md
@@ -0,0 +1,17 @@
1# Treasure TYPE-9 Series II
2
3![TYPE9SII](https://i.imgur.com/lohJ0Dal.png)
4
5Treasure TYPE-9 Series II is a 3x3 Macropad.
6
7* Keyboard Maintainer: [Treasure](https://github.com/TreasureTypes)
8* Hardware Supported: Treasure TYPE-9 Series II PCB
9* Hardware Availability: [Treasure Store](http://treasuretypes.com)
10
11To place the keyboard into bootloader mode in order to flash it, use the reset button on the PCB.
12
13Make example for this keyboard (after setting up your build environment):
14
15 make treasure/type9s2:default
16
17See 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/treasure/type9s2/rules.mk b/keyboards/treasure/type9s2/rules.mk
new file mode 100644
index 000000000..cfa90bc60
--- /dev/null
+++ b/keyboards/treasure/type9s2/rules.mk
@@ -0,0 +1,23 @@
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 = lite # Virtual DIP switch configuration
11MOUSEKEY_ENABLE = no # 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# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
16SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
17# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
18NKRO_ENABLE = no # USB Nkey Rollover
19BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
20RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
21BLUETOOTH_ENABLE = no # Enable Bluetooth
22AUDIO_ENABLE = no # Audio output
23LTO_ENABLE = yes
diff --git a/keyboards/treasure/type9s2/type9s2.c b/keyboards/treasure/type9s2/type9s2.c
new file mode 100644
index 000000000..f5c86e000
--- /dev/null
+++ b/keyboards/treasure/type9s2/type9s2.c
@@ -0,0 +1,16 @@
1/* Copyright 2021 Treasure
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 "type9s2.h"
diff --git a/keyboards/treasure/type9s2/type9s2.h b/keyboards/treasure/type9s2/type9s2.h
new file mode 100644
index 000000000..1a18416bc
--- /dev/null
+++ b/keyboards/treasure/type9s2/type9s2.h
@@ -0,0 +1,29 @@
1/* Copyright 2021 Treasure
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#define LAYOUT_ortho_3x3( \
22 K00, K01, K02, \
23 K10, K11, K12, \
24 K20, K21, K22 \
25) { \
26 { K00, K01, K02 }, \
27 { K10, K11, K12 }, \
28 { K20, K21, K22 } \
29}