aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkwlodarczy <64139515+kwlodarczy@users.noreply.github.com>2020-06-29 23:00:36 +0100
committerGitHub <noreply@github.com>2020-06-29 15:00:36 -0700
commit67beec5e94eefade8d22be10a5308373ddb54118 (patch)
tree3aa1d1e28c75d7c891731159e5dcd4b9fb01fa44
parent09a53d1aa302a166cadbe7c75bc6f64a30e30fe3 (diff)
downloadqmk_firmware-67beec5e94eefade8d22be10a5308373ddb54118.tar.gz
qmk_firmware-67beec5e94eefade8d22be10a5308373ddb54118.zip
[Keyboard] Rotr (#9546)
* Add files via upload * Add files via upload Edited code to fix the formatting so that it follows the conventions. * Create README.md * Update config.h * Update keyboards/rotr/config.h * Update keyboards/rotr/config.h * Update keyboards/rotr/config.h * Update keyboards/rotr/kb.h * Update keyboards/rotr/keymaps/default/keymap.c * Update keyboards/rotr/keymaps/default/keymap.c * Update keyboards/rotr/rules.mk * Update keyboards/rotr/keymaps/default/keymap.c * Update keyboards/rotr/kb.c * Delete Makefile * Rename kb.c to rotr.c * Rename kb.h to rotr.h * Update rules.mk * Rename README.md to readme.md * Create info.json * Update keyboards/rotr/keymaps/default/keymap.c * Update keyboards/rotr/readme.md * Update keyboards/rotr/readme.md * Update keyboards/rotr/readme.md * Update keymap.c * Update rotr.c * Update info.json * Update keyboards/rotr/readme.md
-rw-r--r--keyboards/rotr/config.h46
-rw-r--r--keyboards/rotr/info.json12
-rw-r--r--keyboards/rotr/keymaps/default/keymap.c7
-rw-r--r--keyboards/rotr/readme.md20
-rw-r--r--keyboards/rotr/rotr.c9
-rw-r--r--keyboards/rotr/rotr.h9
-rw-r--r--keyboards/rotr/rules.mk32
7 files changed, 135 insertions, 0 deletions
diff --git a/keyboards/rotr/config.h b/keyboards/rotr/config.h
new file mode 100644
index 000000000..e488a4406
--- /dev/null
+++ b/keyboards/rotr/config.h
@@ -0,0 +1,46 @@
1#pragma once
2
3#include "config_common.h"
4
5/* USB Device descriptor parameter */
6#define VENDOR_ID 0x726F
7#define PRODUCT_ID 0x0001
8#define DEVICE_VER 0x0001
9#define MANUFACTURER ROTR
10#define PRODUCT ROTR
11#define DESCRIPTION Macro Pad and Big Knob
12
13/* key matrix size */
14#define MATRIX_ROWS 1
15#define MATRIX_COLS 3
16
17/* key matrix pins */
18#define MATRIX_ROW_PINS { E6 }
19#define MATRIX_COL_PINS { D1, D0, D4 }
20
21/*Rotary Encoder Pins*/
22#define ENCODERS_PAD_A { C6 }
23#define ENCODERS_PAD_B { D7 }
24
25/*Sets the number of pulses per increment*/
26#define ENCODER_RESOLUTION 2
27
28#define UNUSED_PINS
29
30/* COL2ROW or ROW2COL */
31#define DIODE_DIRECTION COL2ROW
32
33/* number of backlight levels */
34
35#ifdef BACKLIGHT_PIN
36#define BACKLIGHT_LEVELS 3
37#endif
38
39/* Set 0 if debouncing isn't needed */
40#define DEBOUNCE 5
41
42/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
43#define LOCKING_SUPPORT_ENABLE
44
45/* Locking resynchronize hack */
46#define LOCKING_RESYNC_ENABLE
diff --git a/keyboards/rotr/info.json b/keyboards/rotr/info.json
new file mode 100644
index 000000000..b95e8cede
--- /dev/null
+++ b/keyboards/rotr/info.json
@@ -0,0 +1,12 @@
1{
2 "keyboard_name": "rotr",
3 "url": "https://geekhack.org/index.php?topic=107104.0",
4 "maintainer": "qmk",
5 "width": 3,
6 "height": 1,
7 "layouts": {
8 "LAYOUT": {
9 "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}]
10 }
11 }
12}
diff --git a/keyboards/rotr/keymaps/default/keymap.c b/keyboards/rotr/keymaps/default/keymap.c
new file mode 100644
index 000000000..cceb12646
--- /dev/null
+++ b/keyboards/rotr/keymaps/default/keymap.c
@@ -0,0 +1,7 @@
1#include QMK_KEYBOARD_H
2
3const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
4 LAYOUT(
5 KC_MPRV, KC_MPLY, KC_MNXT
6 )
7};
diff --git a/keyboards/rotr/readme.md b/keyboards/rotr/readme.md
new file mode 100644
index 000000000..a3e943fd3
--- /dev/null
+++ b/keyboards/rotr/readme.md
@@ -0,0 +1,20 @@
1# ROTR
2
3![ROTR](https://i.imgur.com/051liRCl.jpg)
4
5A macro pad with a multipurpose knob.
6
7* Keyboard Maintainer: [kwlodarczyk](https://github.com/kwlodarczy)
8* Hardware: [Geekhack](https://geekhack.org/index.php?topic=107104.0)
9
10## Features:
11* Minimal design with plug and play functionality.
12* Frictionless, solid brass knob.
13* Hot swappable switches.
14* USB C connection.
15
16Make example for this keyboard (after setting up your build environment):
17
18 make rotr:default
19
20See 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/rotr/rotr.c b/keyboards/rotr/rotr.c
new file mode 100644
index 000000000..2097bd9c1
--- /dev/null
+++ b/keyboards/rotr/rotr.c
@@ -0,0 +1,9 @@
1#include "rotr.h"
2
3void encoder_update_kb(uint8_t index, bool clockwise) {
4 if (clockwise) {
5 tap_code(KC_VOLU);
6 } else {
7 tap_code(KC_VOLD);
8 }
9}
diff --git a/keyboards/rotr/rotr.h b/keyboards/rotr/rotr.h
new file mode 100644
index 000000000..bf2ff1292
--- /dev/null
+++ b/keyboards/rotr/rotr.h
@@ -0,0 +1,9 @@
1#pragma once
2
3#include "quantum.h"
4
5#define LAYOUT( \
6 K00, K01, K02 \
7) { \
8 { K00, K01, K02 } \
9}
diff --git a/keyboards/rotr/rules.mk b/keyboards/rotr/rules.mk
new file mode 100644
index 000000000..18d378ed7
--- /dev/null
+++ b/keyboards/rotr/rules.mk
@@ -0,0 +1,32 @@
1# MCU name
2MCU = atmega32u4
3
4# Bootloader selection
5# Teensy halfkay
6# Pro Micro caterina
7# Atmel DFU atmel-dfu
8# LUFA DFU lufa-dfu
9# QMK DFU qmk-dfu
10# ATmega32A bootloadHID
11# ATmega328P USBasp
12BOOTLOADER = caterina
13
14# Build Options
15# change yes to no to disable
16#
17BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
18MOUSEKEY_ENABLE = yes # Mouse keys
19EXTRAKEY_ENABLE = yes # Audio control and System control
20CONSOLE_ENABLE = no # Console for debug
21COMMAND_ENABLE = no # Commands for debug and configuration
22# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
23SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
24# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
25NKRO_ENABLE = yes # USB Nkey Rollover
26BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
27RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
28MIDI_ENABLE = no # MIDI support
29BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
30AUDIO_ENABLE = no # Audio output
31FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
32ENCODER_ENABLE = yes # Enables Rotary Encoder support