diff options
-rw-r--r-- | keyboards/smallkeyboard/config.h | 104 | ||||
-rw-r--r-- | keyboards/smallkeyboard/info.json | 17 | ||||
-rw-r--r-- | keyboards/smallkeyboard/keymaps/default/keymap.c | 28 | ||||
-rw-r--r-- | keyboards/smallkeyboard/keymaps/via/keymap.c | 28 | ||||
-rw-r--r-- | keyboards/smallkeyboard/keymaps/via/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/smallkeyboard/readme.md | 18 | ||||
-rw-r--r-- | keyboards/smallkeyboard/rules.mk | 26 | ||||
-rw-r--r-- | keyboards/smallkeyboard/smallkeyboard.c | 49 | ||||
-rw-r--r-- | keyboards/smallkeyboard/smallkeyboard.h | 26 |
9 files changed, 297 insertions, 0 deletions
diff --git a/keyboards/smallkeyboard/config.h b/keyboards/smallkeyboard/config.h new file mode 100644 index 000000000..689d53d54 --- /dev/null +++ b/keyboards/smallkeyboard/config.h | |||
@@ -0,0 +1,104 @@ | |||
1 | /* Copyright 2021 zhouqiong19840119 | ||
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 | |||
18 | #pragma once | ||
19 | |||
20 | /* USB Device descriptor parameter */ | ||
21 | #include "config_common.h" | ||
22 | #define VENDOR_ID 0x7A71 // "zq" = zhouqiong19840119 | ||
23 | #define PRODUCT_ID 0x736B // "sk" = smallkeyboard | ||
24 | #define DEVICE_VER 0x0001 | ||
25 | #define MANUFACTURER zhouqiong19840119 | ||
26 | #define PRODUCT smallkeyboard | ||
27 | |||
28 | /* key matrix size */ | ||
29 | #define MATRIX_ROWS 2 | ||
30 | #define MATRIX_COLS 3 | ||
31 | |||
32 | /* | ||
33 | * Keyboard Matrix Assignments | ||
34 | * | ||
35 | * Change this to how you wired your keyboard | ||
36 | * COLS: AVR pins used for columns, left to right | ||
37 | * ROWS: AVR pins used for rows, top to bottom | ||
38 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | ||
39 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | ||
40 | * | ||
41 | */ | ||
42 | #define MATRIX_ROW_PINS {C7, C6 } | ||
43 | #define MATRIX_COL_PINS {F7, F6, F5} | ||
44 | #define UNUSED_PINS | ||
45 | |||
46 | /* COL2ROW, ROW2COL*/ | ||
47 | #define DIODE_DIRECTION ROW2COL | ||
48 | |||
49 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
50 | #define DEBOUNCE 3 | ||
51 | |||
52 | /* disable these deprecated features by default */ | ||
53 | //#ifndef LINK_TIME_OPTIMIZATION_ENABLE | ||
54 | //# define NO_ACTION_MACRO | ||
55 | //# define NO_ACTION_FUNCTION | ||
56 | //#endif | ||
57 | |||
58 | #ifdef RGB_MATRIX_ENABLE | ||
59 | # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects | ||
60 | # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended | ||
61 | # define RGB_MATRIX_KEYPRESSES | ||
62 | # define RGB_MATRIX_FRAMEBUFFER_EFFECTS | ||
63 | # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN | ||
64 | # define DISABLE_RGB_MATRIX_BAND_SAT | ||
65 | # define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT | ||
66 | # define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT | ||
67 | # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE | ||
68 | # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE | ||
69 | # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS | ||
70 | # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS | ||
71 | # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS | ||
72 | # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS | ||
73 | # define DISABLE_RGB_MATRIX_SPLASH | ||
74 | # define DISABLE_RGB_MATRIX_MULTISPLASH | ||
75 | # define DISABLE_RGB_MATRIX_SOLID_SPLASH | ||
76 | # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH | ||
77 | # define DISABLE_RGB_MATRIX_DIGITAL_RAIN | ||
78 | |||
79 | // This is a 7-bit address, that gets left-shifted and bit 0 | ||
80 | // set to 0 for write, 1 for read (as per I2C protocol) | ||
81 | // The address will vary depending on your wiring: | ||
82 | // 0b1110100 AD <-> GND | ||
83 | // 0b1110111 AD <-> VCC | ||
84 | // 0b1110101 AD <-> SCL | ||
85 | // 0b1110110 AD <-> SDA | ||
86 | #define DRIVER_ADDR_1 0b1110100 | ||
87 | //#define DRIVER_ADDR_2 0b1110110 | ||
88 | |||
89 | #define DRIVER_COUNT 1 | ||
90 | #define DRIVER_1_LED_TOTAL 6 | ||
91 | //#define DRIVER_1_LED_TOTAL 25 | ||
92 | //#define DRIVER_2_LED_TOTAL 24 | ||
93 | //#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) | ||
94 | #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL | ||
95 | #endif | ||
96 | //#define RGB_DI_PIN B7 | ||
97 | //#ifdef RGB_DI_PIN | ||
98 | //#define RGBLIGHT_ANIMATIONS | ||
99 | //#define RGBLED_NUM 8 | ||
100 | //#define RGBLIGHT_HUE_STEP 5 | ||
101 | //#define RGBLIGHT_SAT_STEP 5 | ||
102 | //#define RGBLIGHT_VAL_STEP 5 | ||
103 | //#define RGBLIGHT_SLEEP | ||
104 | //#endif | ||
diff --git a/keyboards/smallkeyboard/info.json b/keyboards/smallkeyboard/info.json new file mode 100644 index 000000000..8d1d642c1 --- /dev/null +++ b/keyboards/smallkeyboard/info.json | |||
@@ -0,0 +1,17 @@ | |||
1 | { | ||
2 | "keyboard_name": "smallkeyboard", | ||
3 | "url": "", | ||
4 | "maintainer": "zhouqiong19840119", | ||
5 | "layouts": { | ||
6 | "LAYOUT_ortho_2x3": { | ||
7 | "layout": [ | ||
8 | {"x":0, "y":0}, | ||
9 | {"x":1, "y":0}, | ||
10 | {"x":2, "y":0}, | ||
11 | {"x":0, "y":1}, | ||
12 | {"x":1, "y":1}, | ||
13 | {"x":2, "y":1} | ||
14 | ] | ||
15 | } | ||
16 | } | ||
17 | } | ||
diff --git a/keyboards/smallkeyboard/keymaps/default/keymap.c b/keyboards/smallkeyboard/keymaps/default/keymap.c new file mode 100644 index 000000000..9ab00be05 --- /dev/null +++ b/keyboards/smallkeyboard/keymaps/default/keymap.c | |||
@@ -0,0 +1,28 @@ | |||
1 | /* Copyright 2021 zhouqiong19840119 | ||
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 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
19 | [0] = LAYOUT_ortho_2x3( | ||
20 | KC_P1, KC_P2, MO(1), | ||
21 | KC_P3, KC_P4, KC_P3), | ||
22 | [1] = LAYOUT_ortho_2x3( | ||
23 | RGB_TOG, RGB_MOD, MO(1), | ||
24 | AU_ON, AU_OFF, MI_ON), | ||
25 | [2] = LAYOUT_ortho_2x3( | ||
26 | KC_P4, KC_P5, MO(1), | ||
27 | KC_P1, KC_P2, KC_P3), | ||
28 | }; | ||
diff --git a/keyboards/smallkeyboard/keymaps/via/keymap.c b/keyboards/smallkeyboard/keymaps/via/keymap.c new file mode 100644 index 000000000..9ab00be05 --- /dev/null +++ b/keyboards/smallkeyboard/keymaps/via/keymap.c | |||
@@ -0,0 +1,28 @@ | |||
1 | /* Copyright 2021 zhouqiong19840119 | ||
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 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
19 | [0] = LAYOUT_ortho_2x3( | ||
20 | KC_P1, KC_P2, MO(1), | ||
21 | KC_P3, KC_P4, KC_P3), | ||
22 | [1] = LAYOUT_ortho_2x3( | ||
23 | RGB_TOG, RGB_MOD, MO(1), | ||
24 | AU_ON, AU_OFF, MI_ON), | ||
25 | [2] = LAYOUT_ortho_2x3( | ||
26 | KC_P4, KC_P5, MO(1), | ||
27 | KC_P1, KC_P2, KC_P3), | ||
28 | }; | ||
diff --git a/keyboards/smallkeyboard/keymaps/via/rules.mk b/keyboards/smallkeyboard/keymaps/via/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/smallkeyboard/keymaps/via/rules.mk | |||
@@ -0,0 +1 @@ | |||
VIA_ENABLE = yes | |||
diff --git a/keyboards/smallkeyboard/readme.md b/keyboards/smallkeyboard/readme.md new file mode 100644 index 000000000..54b4bcb53 --- /dev/null +++ b/keyboards/smallkeyboard/readme.md | |||
@@ -0,0 +1,18 @@ | |||
1 | # SMALLKEYBOARD | ||
2 | |||
3 | .jpg) | ||
4 | |||
5 | * Keyboard Maintainer: [zhouqiong19840119](https://github.com/zhouqiong19840119) | ||
6 | * Hardware Availability: | ||
7 | |||
8 | Make example for this keyboard (after setting up your build environment): | ||
9 | |||
10 | make smallkeyboard:default | ||
11 | |||
12 | Flashing example for this keyboard: | ||
13 | |||
14 | make smallkeyboard:default:flash | ||
15 | |||
16 | To reset the board into bootloader mode, hold the key at the top left of the keyboard while connecting the USB cable (also erases persistent settings). | ||
17 | |||
18 | 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). | ||
diff --git a/keyboards/smallkeyboard/rules.mk b/keyboards/smallkeyboard/rules.mk new file mode 100644 index 000000000..54c776b6e --- /dev/null +++ b/keyboards/smallkeyboard/rules.mk | |||
@@ -0,0 +1,26 @@ | |||
1 | # MCU name | ||
2 | MCU = atmega32u4 | ||
3 | |||
4 | # Bootloader selection | ||
5 | BOOTLOADER = atmel-dfu | ||
6 | |||
7 | # Build Options | ||
8 | # change yes to no to disable | ||
9 | # | ||
10 | BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite | ||
11 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
13 | CONSOLE_ENABLE = yes # Console for debug | ||
14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
15 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
16 | SLEEP_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 | ||
18 | NKRO_ENABLE = no # USB Nkey Rollover | ||
19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
20 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
21 | AUDIO_ENABLE = no # Audio output | ||
22 | |||
23 | RGB_MATRIX_ENABLE = yes | ||
24 | RGB_MATRIX_DRIVER = IS31FL3731 | ||
25 | |||
26 | RGB_MATRIX_SUPPORTED = yes | ||
diff --git a/keyboards/smallkeyboard/smallkeyboard.c b/keyboards/smallkeyboard/smallkeyboard.c new file mode 100644 index 000000000..4da85feff --- /dev/null +++ b/keyboards/smallkeyboard/smallkeyboard.c | |||
@@ -0,0 +1,49 @@ | |||
1 | /* Copyright 2021 zhouqiong19840119 | ||
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 "smallkeyboard.h" | ||
17 | |||
18 | #ifdef RGB_MATRIX_ENABLE | ||
19 | |||
20 | const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { | ||
21 | /* Refer to IS31 manual for these locations | ||
22 | * driver | ||
23 | * | R location | ||
24 | * | | G location | ||
25 | * | | | B location | ||
26 | * | | | | */ | ||
27 | {0, C1_3, C2_3, C3_3},// BL1 | ||
28 | {0, C1_4, C2_4, C3_4},// BL2 | ||
29 | {0, C1_5, C2_5, C3_5},// BL3 | ||
30 | {0, C1_11, C2_11, C3_11},// BL4 | ||
31 | {0, C1_12, C2_12, C3_12},// BL5 | ||
32 | {0, C1_13, C2_13, C3_13},// BL6 | ||
33 | }; | ||
34 | |||
35 | led_config_t g_led_config = { | ||
36 | { | ||
37 | { 0, 1, 2}, | ||
38 | { 3, 4, 5}, | ||
39 | }, | ||
40 | { | ||
41 | { 48, 32},{ 48, 48},{ 64, 48}, | ||
42 | { 80, 16},{ 64, 32},{ 80, 32} | ||
43 | }, | ||
44 | { | ||
45 | 4, 4, 4, | ||
46 | 1, 1, 4 | ||
47 | } | ||
48 | }; | ||
49 | #endif | ||
diff --git a/keyboards/smallkeyboard/smallkeyboard.h b/keyboards/smallkeyboard/smallkeyboard.h new file mode 100644 index 000000000..7741772be --- /dev/null +++ b/keyboards/smallkeyboard/smallkeyboard.h | |||
@@ -0,0 +1,26 @@ | |||
1 | /* Copyright 2021 zhouqiong198401189 | ||
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 | #define LAYOUT_ortho_2x3( \ | ||
21 | K00, K01, K02,\ | ||
22 | K10, K11, K12 \ | ||
23 | ) { \ | ||
24 | { K00, K01, K02 }, \ | ||
25 | { K10, K11, K12 } \ | ||
26 | } | ||