summaryrefslogtreecommitdiffstats
path: root/keyboards
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 /keyboards
parent09a53d1aa302a166cadbe7c75bc6f64a30e30fe3 (diff)
[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
Diffstat (limited to 'keyboards')
-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 0000000000..e488a4406c
--- /dev/null
+++ b/keyboards/rotr/config.h
@@ -0,0 +1,46 @@
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x726F
+#define PRODUCT_ID 0x0001
+#define DEVICE_VER 0x0001
+#define MANUFACTURER ROTR
+#define PRODUCT ROTR
+#define DESCRIPTION Macro Pad and Big Knob
+
+/* key matrix size */
+#define MATRIX_ROWS 1
+#define MATRIX_COLS 3
+
+/* key matrix pins */
+#define MATRIX_ROW_PINS { E6 }
+#define MATRIX_COL_PINS { D1, D0, D4 }
+
+/*Rotary Encoder Pins*/
+#define ENCODERS_PAD_A { C6 }
+#define ENCODERS_PAD_B { D7 }
+
+/*Sets the number of pulses per increment*/
+#define ENCODER_RESOLUTION 2
+
+#define UNUSED_PINS
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/* number of backlight levels */
+
+#ifdef BACKLIGHT_PIN
+#define BACKLIGHT_LEVELS 3
+#endif
+
+/* Set 0 if debouncing isn't 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
diff --git a/keyboards/rotr/info.json b/keyboards/rotr/info.json
new file mode 100644
index 0000000000..b95e8cedee
--- /dev/null
+++ b/keyboards/rotr/info.json
@@ -0,0 +1,12 @@
+{
+ "keyboard_name": "rotr",
+ "url": "https://geekhack.org/index.php?topic=107104.0",
+ "maintainer": "qmk",
+ "width": 3,
+ "height": 1,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}]
+ }
+ }
+}
diff --git a/keyboards/rotr/keymaps/default/keymap.c b/keyboards/rotr/keymaps/default/keymap.c
new file mode 100644
index 0000000000..cceb126461
--- /dev/null
+++ b/keyboards/rotr/keymaps/default/keymap.c
@@ -0,0 +1,7 @@
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ LAYOUT(
+ KC_MPRV, KC_MPLY, KC_MNXT
+ )
+};
diff --git a/keyboards/rotr/readme.md b/keyboards/rotr/readme.md
new file mode 100644
index 0000000000..a3e943fd3d
--- /dev/null
+++ b/keyboards/rotr/readme.md
@@ -0,0 +1,20 @@
+# ROTR
+
+![ROTR](https://i.imgur.com/051liRCl.jpg)
+
+A macro pad with a multipurpose knob.
+
+* Keyboard Maintainer: [kwlodarczyk](https://github.com/kwlodarczy)
+* Hardware: [Geekhack](https://geekhack.org/index.php?topic=107104.0)
+
+## Features:
+* Minimal design with plug and play functionality.
+* Frictionless, solid brass knob.
+* Hot swappable switches.
+* USB C connection.
+
+Make example for this keyboard (after setting up your build environment):
+
+ make rotr: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).
diff --git a/keyboards/rotr/rotr.c b/keyboards/rotr/rotr.c
new file mode 100644
index 0000000000..2097bd9c14
--- /dev/null
+++ b/keyboards/rotr/rotr.c
@@ -0,0 +1,9 @@
+#include "rotr.h"
+
+void encoder_update_kb(uint8_t index, bool clockwise) {
+ if (clockwise) {
+ tap_code(KC_VOLU);
+ } else {
+ tap_code(KC_VOLD);
+ }
+}
diff --git a/keyboards/rotr/rotr.h b/keyboards/rotr/rotr.h
new file mode 100644
index 0000000000..bf2ff12929
--- /dev/null
+++ b/keyboards/rotr/rotr.h
@@ -0,0 +1,9 @@
+#pragma once
+
+#include "quantum.h"
+
+#define LAYOUT( \
+ K00, K01, K02 \
+) { \
+ { K00, K01, K02 } \
+}
diff --git a/keyboards/rotr/rules.mk b/keyboards/rotr/rules.mk
new file mode 100644
index 0000000000..18d378ed7c
--- /dev/null
+++ b/keyboards/rotr/rules.mk
@@ -0,0 +1,32 @@
+# MCU name
+MCU = atmega32u4
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# ATmega32A bootloadHID
+# ATmega328P USBasp
+BOOTLOADER = caterina
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = yes # 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 = no # Enable keyboard RGB underglow
+MIDI_ENABLE = no # MIDI support
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
+ENCODER_ENABLE = yes # Enables Rotary Encoder support