Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
commit
98b8fd6d21
17
keyboards/leafcutterlabs/bigknob/bigknob.c
Normal file
17
keyboards/leafcutterlabs/bigknob/bigknob.c
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
/* Copyright 2021 Craig Gardner
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "bigknob.h"
|
27
keyboards/leafcutterlabs/bigknob/bigknob.h
Normal file
27
keyboards/leafcutterlabs/bigknob/bigknob.h
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
/* Copyright 2021 Craig Gardner
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT_ortho_1x5( \
|
||||||
|
k01, k02, k03, k04, k05\
|
||||||
|
) { \
|
||||||
|
{ k01, k02, k03, k04, k05 } \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define LAYOUT LAYOUT_ortho_1x5
|
58
keyboards/leafcutterlabs/bigknob/config.h
Normal file
58
keyboards/leafcutterlabs/bigknob/config.h
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
/*
|
||||||
|
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0xCEEB
|
||||||
|
#define PRODUCT_ID 0x0007
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER leafcutterlabs
|
||||||
|
#define PRODUCT bigKNOB
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 1
|
||||||
|
#define MATRIX_COLS 5
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keyboard Matrix Assignments
|
||||||
|
*
|
||||||
|
* Change this to how you wired your keyboard
|
||||||
|
* COLS: AVR pins used for columns, left to right
|
||||||
|
* ROWS: AVR pins used for rows, top to bottom
|
||||||
|
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||||
|
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||||
|
* NO_DIODE = switches are directly connected to AVR pins
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Srating with closest to USB port
|
||||||
|
#define DIRECT_PINS { \
|
||||||
|
{ B7, D4, D6, F6, F7} \
|
||||||
|
}
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* rotary encoder 1,2,3 closest to usb port is 0*/
|
||||||
|
#define ENCODERS_PAD_A { D0}
|
||||||
|
#define ENCODERS_PAD_B { D2}
|
||||||
|
#define ENCODER_RESOLUTION 4 //default/suggested
|
||||||
|
|
||||||
|
/* ws2812 RGB LED */
|
||||||
|
#define RGB_DI_PIN C7 //D3 - underglow C7 - backlight
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
#define RGBLED_NUM 5 // Number of LEDs
|
12
keyboards/leafcutterlabs/bigknob/info.json
Normal file
12
keyboards/leafcutterlabs/bigknob/info.json
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"keyboard_name": "bigknob",
|
||||||
|
"url": "",
|
||||||
|
"maintainer": "qmk",
|
||||||
|
"width": 5,
|
||||||
|
"height": 1,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_ortho_1x5": {
|
||||||
|
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
55
keyboards/leafcutterlabs/bigknob/keymaps/default/keymap.c
Normal file
55
keyboards/leafcutterlabs/bigknob/keymaps/default/keymap.c
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
/* Copyright 2021 Craig Gardner
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
#define _MAIN 0
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
if (index == 0) {
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_VOLU);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_VOLD);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
enum {
|
||||||
|
TD_RGB = 0
|
||||||
|
};
|
||||||
|
|
||||||
|
void dance_rgb_finished (qk_tap_dance_state_t *state, void *user_data) {
|
||||||
|
if (state->count == 1) {
|
||||||
|
tap_code(KC_MNXT);
|
||||||
|
} else if (state->count == 2) {
|
||||||
|
rgblight_toggle();
|
||||||
|
} else if (state->count == 3) {
|
||||||
|
rgblight_step();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//All tap dance functions would go here. Only showing this one.
|
||||||
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
|
[TD_RGB] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_rgb_finished, NULL)
|
||||||
|
};
|
||||||
|
|
||||||
|
//
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //buttion closest to usb is first
|
||||||
|
[_MAIN] = LAYOUT(
|
||||||
|
KC_MUTE, KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_STOP, TD(TD_RGB)
|
||||||
|
)
|
||||||
|
};
|
15
keyboards/leafcutterlabs/bigknob/readme.md
Normal file
15
keyboards/leafcutterlabs/bigknob/readme.md
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
# bigknob
|
||||||
|
|
||||||
|
A 4 key Macropad with Rotary Encoder based on Atmega32u4.
|
||||||
|
|
||||||
|
![](https://i.imgur.com/Px3EpOUl.jpg)
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [LeafCutterLabs](https://github.com/LeafCutterLabs)
|
||||||
|
* Hardware Supported: Atmega32u4
|
||||||
|
* Hardware availability: Case files are available [here](https://github.com/LeafCutterLabs/bigKNOB)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make leafcutterlabs/bigknob:default
|
||||||
|
|
||||||
|
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).
|
24
keyboards/leafcutterlabs/bigknob/rules.mk
Normal file
24
keyboards/leafcutterlabs/bigknob/rules.mk
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
BOOTLOADER = caterina
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||||
|
AUDIO_ENABLE = no # Audio output
|
||||||
|
ENCODER_ENABLE = yes # Enable rotary encoders
|
||||||
|
TAP_DANCE_ENABLE = yes
|
Loading…
Reference in a new issue