diff options
| -rw-r--r-- | keyboards/keebio/stick/config.h | 61 | ||||
| -rw-r--r-- | keyboards/keebio/stick/info.json | 25 | ||||
| -rw-r--r-- | keyboards/keebio/stick/keymaps/default/keymap.c | 42 | ||||
| -rw-r--r-- | keyboards/keebio/stick/keymaps/via/keymap.c | 54 | ||||
| -rw-r--r-- | keyboards/keebio/stick/keymaps/via/rules.mk | 5 | ||||
| -rw-r--r-- | keyboards/keebio/stick/readme.md | 19 | ||||
| -rw-r--r-- | keyboards/keebio/stick/rules.mk | 25 | ||||
| -rw-r--r-- | keyboards/keebio/stick/stick.c | 50 | ||||
| -rw-r--r-- | keyboards/keebio/stick/stick.h | 26 |
9 files changed, 307 insertions, 0 deletions
diff --git a/keyboards/keebio/stick/config.h b/keyboards/keebio/stick/config.h new file mode 100644 index 000000000..0a43bb861 --- /dev/null +++ b/keyboards/keebio/stick/config.h | |||
| @@ -0,0 +1,61 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2021 Danny Nguyen <danny@keeb.io> | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along 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 0xCB10 | ||
| 24 | #define PRODUCT_ID 0x111C | ||
| 25 | #define DEVICE_VER 0x0100 | ||
| 26 | #define MANUFACTURER Keebio | ||
| 27 | #define PRODUCT The Stick | ||
| 28 | |||
| 29 | /* key matrix size */ | ||
| 30 | #define MATRIX_ROWS 1 | ||
| 31 | #define MATRIX_COLS 12 | ||
| 32 | |||
| 33 | /* key matrix pins */ | ||
| 34 | #define DIRECT_PINS { \ | ||
| 35 | { F4, B6, B5, B4, E6, D7, F6, F7, B1, B3, B2, F5 } \ | ||
| 36 | } | ||
| 37 | |||
| 38 | #define ENCODERS_PAD_A { D1, D4 } | ||
| 39 | #define ENCODERS_PAD_B { D0, C6 } | ||
| 40 | |||
| 41 | /* WS2812 RGB LED */ | ||
| 42 | #define RGB_DI_PIN D3 | ||
| 43 | #ifdef RGB_DI_PIN | ||
| 44 | # define RGBLED_NUM 12 | ||
| 45 | # define RGBLIGHT_HUE_STEP 8 | ||
| 46 | # define RGBLIGHT_SAT_STEP 8 | ||
| 47 | # define RGBLIGHT_VAL_STEP 8 | ||
| 48 | # define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ | ||
| 49 | # define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ | ||
| 50 | /*== all animations enable ==*/ | ||
| 51 | # define RGBLIGHT_ANIMATIONS | ||
| 52 | // RGB Matrix | ||
| 53 | # ifdef RGB_MATRIX_ENABLE | ||
| 54 | # define DRIVER_LED_TOTAL RGBLED_NUM | ||
| 55 | # endif | ||
| 56 | #endif | ||
| 57 | |||
| 58 | /* COL2ROW or ROW2COL */ | ||
| 59 | #define DIODE_DIRECTION COL2ROW | ||
| 60 | |||
| 61 | #define TAPPING_TERM 200 | ||
diff --git a/keyboards/keebio/stick/info.json b/keyboards/keebio/stick/info.json new file mode 100644 index 000000000..33029e8cb --- /dev/null +++ b/keyboards/keebio/stick/info.json | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "The Stick", | ||
| 3 | "url": "https://keeb.io", | ||
| 4 | "maintainer": "nooges", | ||
| 5 | "width": 12, | ||
| 6 | "height": 1, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT": { | ||
| 9 | "layout": [ | ||
| 10 | { "label": "F1", "x": 0, "y": 0 }, | ||
| 11 | { "label": "F2", "x": 1, "y": 0 }, | ||
| 12 | { "label": "F3", "x": 2, "y": 0 }, | ||
| 13 | { "label": "F4", "x": 3, "y": 0 }, | ||
| 14 | { "label": "F5", "x": 4, "y": 0 }, | ||
| 15 | { "label": "F6", "x": 5, "y": 0 }, | ||
| 16 | { "label": "F7", "x": 6, "y": 0 }, | ||
| 17 | { "label": "F8", "x": 7, "y": 0 }, | ||
| 18 | { "label": "F9", "x": 8, "y": 0 }, | ||
| 19 | { "label": "F10", "x": 9, "y": 0 }, | ||
| 20 | { "label": "F11", "x": 10, "y": 0 }, | ||
| 21 | { "label": "F12", "x": 11, "y": 0 } | ||
| 22 | ] | ||
| 23 | } | ||
| 24 | } | ||
| 25 | } | ||
diff --git a/keyboards/keebio/stick/keymaps/default/keymap.c b/keyboards/keebio/stick/keymaps/default/keymap.c new file mode 100644 index 000000000..0521afa88 --- /dev/null +++ b/keyboards/keebio/stick/keymaps/default/keymap.c | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2021 Danny Nguyen <danny@keeb.io> | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #include QMK_KEYBOARD_H | ||
| 19 | |||
| 20 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 21 | |||
| 22 | [0] = LAYOUT( | ||
| 23 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 | ||
| 24 | ), | ||
| 25 | }; | ||
| 26 | |||
| 27 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
| 28 | if (index == 0) { | ||
| 29 | if (clockwise) { | ||
| 30 | tap_code(KC_VOLU); | ||
| 31 | } else { | ||
| 32 | tap_code(KC_VOLD); | ||
| 33 | } | ||
| 34 | } | ||
| 35 | else if (index == 1) { | ||
| 36 | if (clockwise) { | ||
| 37 | tap_code(KC_DOWN); | ||
| 38 | } else { | ||
| 39 | tap_code(KC_UP); | ||
| 40 | } | ||
| 41 | } | ||
| 42 | } | ||
diff --git a/keyboards/keebio/stick/keymaps/via/keymap.c b/keyboards/keebio/stick/keymaps/via/keymap.c new file mode 100644 index 000000000..3f712e619 --- /dev/null +++ b/keyboards/keebio/stick/keymaps/via/keymap.c | |||
| @@ -0,0 +1,54 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2021 Danny Nguyen <danny@keeb.io> | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #include QMK_KEYBOARD_H | ||
| 19 | |||
| 20 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 21 | |||
| 22 | [0] = LAYOUT( | ||
| 23 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 | ||
| 24 | ), | ||
| 25 | |||
| 26 | [1] = LAYOUT( | ||
| 27 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 28 | ), | ||
| 29 | |||
| 30 | [2] = LAYOUT( | ||
| 31 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 32 | ), | ||
| 33 | |||
| 34 | [3] = LAYOUT( | ||
| 35 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 36 | ), | ||
| 37 | }; | ||
| 38 | |||
| 39 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
| 40 | if (index == 0) { | ||
| 41 | if (clockwise) { | ||
| 42 | tap_code(KC_VOLU); | ||
| 43 | } else { | ||
| 44 | tap_code(KC_VOLD); | ||
| 45 | } | ||
| 46 | } | ||
| 47 | else if (index == 1) { | ||
| 48 | if (clockwise) { | ||
| 49 | tap_code(KC_DOWN); | ||
| 50 | } else { | ||
| 51 | tap_code(KC_UP); | ||
| 52 | } | ||
| 53 | } | ||
| 54 | } | ||
diff --git a/keyboards/keebio/stick/keymaps/via/rules.mk b/keyboards/keebio/stick/keymaps/via/rules.mk new file mode 100644 index 000000000..d96967a60 --- /dev/null +++ b/keyboards/keebio/stick/keymaps/via/rules.mk | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | VIA_ENABLE = yes | ||
| 2 | LTO_ENABLE = yes | ||
| 3 | MOUSEKEY_ENABLE = yes | ||
| 4 | CONSOLE_ENABLE = yes | ||
| 5 | COMMAND_ENABLE = no | ||
diff --git a/keyboards/keebio/stick/readme.md b/keyboards/keebio/stick/readme.md new file mode 100644 index 000000000..ea7f7751f --- /dev/null +++ b/keyboards/keebio/stick/readme.md | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | # The Stick | ||
| 2 | |||
| 3 | A 12-key macrostick keyboard made and sold by Keebio. [More info at Keebio](https://keeb.io). | ||
| 4 | |||
| 5 | * Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) | ||
| 6 | * Hardware Supported: Pro Micro, Elite-C, Proton C | ||
| 7 | * Hardware Availability: [Keebio](https://keeb.io) | ||
| 8 | |||
| 9 | Make example for this keyboard (after setting up your build environment): | ||
| 10 | |||
| 11 | make keebio/stick:default | ||
| 12 | |||
| 13 | Flashing example for this keyboard: | ||
| 14 | |||
| 15 | make keebio/stick:default:flash | ||
| 16 | |||
| 17 | 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). | ||
| 18 | |||
| 19 | A build guide for this keyboard can be found here: [Keebio Build Guides](https://docs.keeb.io) | ||
diff --git a/keyboards/keebio/stick/rules.mk b/keyboards/keebio/stick/rules.mk new file mode 100644 index 000000000..36791b6c6 --- /dev/null +++ b/keyboards/keebio/stick/rules.mk | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32u4 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | BOOTLOADER = caterina | ||
| 6 | |||
| 7 | # Build Options | ||
| 8 | # change yes to no to disable | ||
| 9 | # | ||
| 10 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration | ||
| 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 | BLUETOOTH_ENABLE = no # Enable Bluetooth | ||
| 22 | AUDIO_ENABLE = no # Audio output | ||
| 23 | ENCODER_ENABLE = yes | ||
| 24 | RGB_MATRIX_ENABLE = yes | ||
| 25 | RGB_MATRIX_DRIVER = WS2812 | ||
diff --git a/keyboards/keebio/stick/stick.c b/keyboards/keebio/stick/stick.c new file mode 100644 index 000000000..050c4eff8 --- /dev/null +++ b/keyboards/keebio/stick/stick.c | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2021 Danny Nguyen <danny@keeb.io> | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #include "stick.h" | ||
| 19 | |||
| 20 | #ifdef RGB_MATRIX_ENABLE | ||
| 21 | led_config_t g_led_config = { { | ||
| 22 | // Key Matrix to LED Index | ||
| 23 | { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 } | ||
| 24 | }, { | ||
| 25 | // LED Index to Physical Position | ||
| 26 | { 0, 0 }, { 20, 0 }, { 40, 0 }, { 60, 0 }, | ||
| 27 | { 80, 0 }, { 100, 0 }, { 120, 0 }, { 140, 0 }, | ||
| 28 | { 160, 0 }, { 180, 0 }, { 200, 0 }, { 220, 0 }, | ||
| 29 | }, { | ||
| 30 | // LED Index to Flag | ||
| 31 | 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 | ||
| 32 | } }; | ||
| 33 | #endif | ||
| 34 | |||
| 35 | void eeconfig_init_kb(void) { | ||
| 36 | #ifdef RGBLIGHT_ENABLE | ||
| 37 | rgblight_enable(); // Enable RGB by default | ||
| 38 | rgblight_sethsv(0, 255, 255); // Set default HSV - red hue, full saturation, full brightness | ||
| 39 | # ifdef RGBLIGHT_ANIMATIONS | ||
| 40 | rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL + 2); // set to RGB_RAINBOW_SWIRL by default | ||
| 41 | # endif | ||
| 42 | #endif | ||
| 43 | |||
| 44 | #ifdef RGB_MATRIX_ENABLE | ||
| 45 | rgb_matrix_enable(); // Enable RGB by default | ||
| 46 | #endif | ||
| 47 | |||
| 48 | eeconfig_update_kb(0); | ||
| 49 | eeconfig_init_user(); | ||
| 50 | } | ||
diff --git a/keyboards/keebio/stick/stick.h b/keyboards/keebio/stick/stick.h new file mode 100644 index 000000000..758d7d5b9 --- /dev/null +++ b/keyboards/keebio/stick/stick.h | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2021 Danny Nguyen <danny@keeb.io> | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #pragma once | ||
| 19 | |||
| 20 | #include "quantum.h" | ||
| 21 | |||
| 22 | #define LAYOUT( \ | ||
| 23 | A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12 \ | ||
| 24 | ) { \ | ||
| 25 | {A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12} \ | ||
| 26 | } | ||
