diff options
-rw-r--r-- | keyboards/leafcutterlabs/bigknob/bigknob.c | 17 | ||||
-rw-r--r-- | keyboards/leafcutterlabs/bigknob/bigknob.h | 27 | ||||
-rw-r--r-- | keyboards/leafcutterlabs/bigknob/config.h | 58 | ||||
-rw-r--r-- | keyboards/leafcutterlabs/bigknob/info.json | 12 | ||||
-rw-r--r-- | keyboards/leafcutterlabs/bigknob/keymaps/default/keymap.c | 55 | ||||
-rw-r--r-- | keyboards/leafcutterlabs/bigknob/readme.md | 15 | ||||
-rw-r--r-- | keyboards/leafcutterlabs/bigknob/rules.mk | 24 |
7 files changed, 208 insertions, 0 deletions
diff --git a/keyboards/leafcutterlabs/bigknob/bigknob.c b/keyboards/leafcutterlabs/bigknob/bigknob.c new file mode 100644 index 000000000..0a4d173e5 --- /dev/null +++ b/keyboards/leafcutterlabs/bigknob/bigknob.c | |||
@@ -0,0 +1,17 @@ | |||
1 | /* Copyright 2021 Craig Gardner | ||
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 "bigknob.h" | ||
diff --git a/keyboards/leafcutterlabs/bigknob/bigknob.h b/keyboards/leafcutterlabs/bigknob/bigknob.h new file mode 100644 index 000000000..ddd3aa4ae --- /dev/null +++ b/keyboards/leafcutterlabs/bigknob/bigknob.h | |||
@@ -0,0 +1,27 @@ | |||
1 | /* Copyright 2021 Craig Gardner | ||
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_1x5( \ | ||
22 | k01, k02, k03, k04, k05\ | ||
23 | ) { \ | ||
24 | { k01, k02, k03, k04, k05 } \ | ||
25 | } | ||
26 | |||
27 | #define LAYOUT LAYOUT_ortho_1x5 \ No newline at end of file | ||
diff --git a/keyboards/leafcutterlabs/bigknob/config.h b/keyboards/leafcutterlabs/bigknob/config.h new file mode 100644 index 000000000..5f958293c --- /dev/null +++ b/keyboards/leafcutterlabs/bigknob/config.h | |||
@@ -0,0 +1,58 @@ | |||
1 | /* | ||
2 | Copyright 2012 Jun Wako <wakojun@gmail.com> | ||
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 0xCEEB | ||
24 | #define PRODUCT_ID 0x0007 | ||
25 | #define DEVICE_VER 0x0001 | ||
26 | #define MANUFACTURER leafcutterlabs | ||
27 | #define PRODUCT bigKNOB | ||
28 | /* key matrix size */ | ||
29 | #define MATRIX_ROWS 1 | ||
30 | #define MATRIX_COLS 5 | ||
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 | * NO_DIODE = switches are directly connected to AVR pins | ||
41 | * | ||
42 | */ | ||
43 | |||
44 | // Srating with closest to USB port | ||
45 | #define DIRECT_PINS { \ | ||
46 | { B7, D4, D6, F6, F7} \ | ||
47 | } | ||
48 | #define UNUSED_PINS | ||
49 | |||
50 | /* rotary encoder 1,2,3 closest to usb port is 0*/ | ||
51 | #define ENCODERS_PAD_A { D0} | ||
52 | #define ENCODERS_PAD_B { D2} | ||
53 | #define ENCODER_RESOLUTION 4 //default/suggested | ||
54 | |||
55 | /* ws2812 RGB LED */ | ||
56 | #define RGB_DI_PIN C7 //D3 - underglow C7 - backlight | ||
57 | #define RGBLIGHT_ANIMATIONS | ||
58 | #define RGBLED_NUM 5 // Number of LEDs | ||
diff --git a/keyboards/leafcutterlabs/bigknob/info.json b/keyboards/leafcutterlabs/bigknob/info.json new file mode 100644 index 000000000..697edebbe --- /dev/null +++ b/keyboards/leafcutterlabs/bigknob/info.json | |||
@@ -0,0 +1,12 @@ | |||
1 | { | ||
2 | "keyboard_name": "bigknob", | ||
3 | "url": "", | ||
4 | "maintainer": "qmk", | ||
5 | "width": 5, | ||
6 | "height": 1, | ||
7 | "layouts": { | ||
8 | "LAYOUT_ortho_1x5": { | ||
9 | "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}] | ||
10 | } | ||
11 | } | ||
12 | } | ||
diff --git a/keyboards/leafcutterlabs/bigknob/keymaps/default/keymap.c b/keyboards/leafcutterlabs/bigknob/keymaps/default/keymap.c new file mode 100644 index 000000000..999d3c434 --- /dev/null +++ b/keyboards/leafcutterlabs/bigknob/keymaps/default/keymap.c | |||
@@ -0,0 +1,55 @@ | |||
1 | /* Copyright 2021 Craig Gardner | ||
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 | |||
19 | #define _MAIN 0 | ||
20 | |||
21 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
22 | if (index == 0) { | ||
23 | if (clockwise) { | ||
24 | tap_code(KC_VOLU); | ||
25 | } else { | ||
26 | tap_code(KC_VOLD); | ||
27 | } | ||
28 | } | ||
29 | } | ||
30 | |||
31 | enum { | ||
32 | TD_RGB = 0 | ||
33 | }; | ||
34 | |||
35 | void dance_rgb_finished (qk_tap_dance_state_t *state, void *user_data) { | ||
36 | if (state->count == 1) { | ||
37 | tap_code(KC_MNXT); | ||
38 | } else if (state->count == 2) { | ||
39 | rgblight_toggle(); | ||
40 | } else if (state->count == 3) { | ||
41 | rgblight_step(); | ||
42 | } | ||
43 | } | ||
44 | |||
45 | //All tap dance functions would go here. Only showing this one. | ||
46 | qk_tap_dance_action_t tap_dance_actions[] = { | ||
47 | [TD_RGB] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_rgb_finished, NULL) | ||
48 | }; | ||
49 | |||
50 | // | ||
51 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //buttion closest to usb is first | ||
52 | [_MAIN] = LAYOUT( | ||
53 | KC_MUTE, KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_STOP, TD(TD_RGB) | ||
54 | ) | ||
55 | }; | ||
diff --git a/keyboards/leafcutterlabs/bigknob/readme.md b/keyboards/leafcutterlabs/bigknob/readme.md new file mode 100644 index 000000000..d67a1858b --- /dev/null +++ b/keyboards/leafcutterlabs/bigknob/readme.md | |||
@@ -0,0 +1,15 @@ | |||
1 | # bigknob | ||
2 | |||
3 | A 4 key Macropad with Rotary Encoder based on Atmega32u4. | ||
4 | |||
5 |  | ||
6 | |||
7 | * Keyboard Maintainer: [LeafCutterLabs](https://github.com/LeafCutterLabs) | ||
8 | * Hardware Supported: Atmega32u4 | ||
9 | * Hardware availability: Case files are available [here](https://github.com/LeafCutterLabs/bigKNOB) | ||
10 | |||
11 | Make example for this keyboard (after setting up your build environment): | ||
12 | |||
13 | make leafcutterlabs/bigknob:default | ||
14 | |||
15 | 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/leafcutterlabs/bigknob/rules.mk b/keyboards/leafcutterlabs/bigknob/rules.mk new file mode 100644 index 000000000..5993a2c1c --- /dev/null +++ b/keyboards/leafcutterlabs/bigknob/rules.mk | |||
@@ -0,0 +1,24 @@ | |||
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 = no # 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 = yes # USB Nkey Rollover | ||
19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
20 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
21 | BLUETOOTH_ENABLE = no # Enable Bluetooth | ||
22 | AUDIO_ENABLE = no # Audio output | ||
23 | ENCODER_ENABLE = yes # Enable rotary encoders | ||
24 | TAP_DANCE_ENABLE = yes \ No newline at end of file | ||