Merge remote-tracking branch 'origin/master' into develop

This commit is contained in:
QMK Bot 2021-07-11 16:42:52 +00:00
commit fd284c43a5
9 changed files with 225 additions and 10 deletions

View file

@ -0,0 +1,72 @@
/*
Copyright 2021 CapsUnlocked
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 0x4355
#define PRODUCT_ID 0x0007
#define DEVICE_VER 0x0001
#define MANUFACTURER CapsUnlocked
#define PRODUCT CU7
/* key matrix size */
#define MATRIX_ROWS 3
#define MATRIX_COLS 3
/*
* 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)
*
*/
#define ENCODER_RESOLUTION 2
#define ENCODERS_PAD_A { D6 }
#define ENCODERS_PAD_B { D4 }
#define MATRIX_ROW_PINS { D7, F0, F6 }
#define MATRIX_COL_PINS { F5, F7, F4 }
#define UNUSED_PINS
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
#define DIODE_DIRECTION COL2ROW
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
#define RGB_DI_PIN F1
#ifdef RGB_DI_PIN
#define RGBLIGHT_ANIMATIONS
// #define RGBLIGHT_EFFECT_BREATHING
#define RGBLED_NUM 6
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17
#define RGBLIGHT_VAL_STEP 17
#define RGBLIGHT_LIMIT_VAL 50
#endif

View file

@ -0,0 +1,14 @@
/*
Copyright 2021 CapsUnlocked
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 "cu7.h"

View file

@ -0,0 +1,36 @@
/*
Copyright 2021 CapsUnlocked
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"
/* This a shortcut to help you visually see your layout.
*
* The first section contains all of the arguments representing the physical
* layout of the board and position of the keys.
*
* The second converts the arguments into a two-dimensional array which
* represents the switch matrix.
*/
#define LAYOUT( \
K01, \
K10, K11, K12, \
K20, K21, K22 \
) { \
{ KC_NO, K01, KC_NO }, \
{ K10, K11, K12 }, \
{ K20, K21, K22 } \
}

View file

@ -0,0 +1,12 @@
{
"keyboard_name": "CU7",
"url": "https://caps-unlocked.com/cu7/",
"maintainer": "rys",
"width": 3,
"height": 4.5,
"layouts": {
"LAYOUT": {
"layout": [{"x":0, "y":2.5}, {"x":1, "y":2.5}, {"x":2, "y":2.5}, {"x":0, "y":3.5}, {"x":1, "y":3.5}, {"x":2, "y":3.5}]
}
}
}

View file

@ -0,0 +1,42 @@
/*
Copyright 2021 CapsUnlocked
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
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
MO(1),
KC_1, KC_2, KC_3,
KC_4, KC_5, KC_6
),
[1] = LAYOUT(
_______,
RGB_MOD, KC_UP, RESET,
KC_LEFT, KC_DOWN, KC_RGHT
),
};
// Volume up/down on the encoder
bool encoder_update_user(uint8_t index, bool clockwise) {
if (clockwise) {
tap_code_delay(KC_VOLU, 10);
}
else {
tap_code_delay(KC_VOLD, 10);
}
return true;
}

View file

@ -0,0 +1 @@
# The default keymap for CU7

View file

@ -0,0 +1,15 @@
# CU7
The CU7 is a customisable 3x2 key macropad with a clickable rotary encoder.
To place the keyboard into bootloader mode in order to flash it, use the reset button on the PCB.
* Keyboard maintainer: [rys](https://github.com/rys)
* Hardware supported: CU7
* Hardware availability: [CapsUnlocked](https://caps-unlocked.com/cu7/)
Make and flash example for this keyboard (after setting up your build environment):
make capsunlocked/cu7:default:flash
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).

View file

@ -0,0 +1,23 @@
# MCU name
MCU = atmega32u4
# Bootloader
BOOTLOADER = atmel-dfu
# 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 = no # 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

View file

@ -45,8 +45,8 @@
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313 }, \
{ K400, K401, K402, KC_NO, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413 }, \
{ K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313 }, \
{ K400, KC_NO, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, KC_NO, K411, KC_NO, K413 }, \
}
#define LAYOUT_hhkb_standard( \
@ -60,8 +60,8 @@
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313 }, \
{ K400, K401, K402, KC_NO, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413 }, \
{ K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313 }, \
{ KC_NO, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, KC_NO, K411, K412, KC_NO}, \
}
#define LAYOUT_wkl_iso( \
@ -76,7 +76,7 @@
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313 }, \
{ K400, K401, K402, KC_NO, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413 }, \
{ K400, KC_NO, K402, KC_NO, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, KC_NO, K413 }, \
}
#define LAYOUT_hhkb_iso( \
@ -91,7 +91,7 @@
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313 }, \
{ K400, K401, K402, KC_NO, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413 }, \
{ KC_NO, K401, K402, KC_NO, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, KC_NO}, \
}
#define LAYOUT_wkl_splitspace( \
@ -105,8 +105,8 @@
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313 }, \
{ K400, K401, K402, KC_NO, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413 }, \
{ K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313 }, \
{ K400, KC_NO, K402, KC_NO, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, KC_NO, K413 }, \
}
#define LAYOUT_hhkb_splitspace( \
@ -120,6 +120,6 @@
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313 }, \
{ K400, K401, K402, KC_NO, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413 }, \
{ K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313 }, \
{ KC_NO, K401, K402, KC_NO, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, KC_NO}, \
}