summaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2021-09-11 23:21:28 -0700
committerGitHub <noreply@github.com>2021-09-11 23:21:28 -0700
commitf6a67c10bd0fe59d0b468ba870bb511d9787a34c (patch)
tree2c15f6dfbbc06498d04b81cb8ab5cfcb8b8102ce /keyboards
parent5af17997359d91ee0a7340d1e17514fe8c8a46f1 (diff)
[Keyboard] Fix Redox Media compilation errors (#14345)
Co-authored-by: Ryan <fauxpark@gmail.com>
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/redox/keymaps/media_ch/rules.mk2
-rw-r--r--keyboards/redox/media/rules.mk0
-rw-r--r--keyboards/redox_media/config.h (renamed from keyboards/redox/media/config.h)0
-rw-r--r--keyboards/redox_media/keymaps/default/config.h (renamed from keyboards/redox/keymaps/media_ch/config.h)0
-rw-r--r--keyboards/redox_media/keymaps/default/keymap.c (renamed from keyboards/redox/keymaps/media_ch/keymap.c)17
-rw-r--r--keyboards/redox_media/keymaps/default/readme.md (renamed from keyboards/redox/keymaps/media_ch/readme.md)0
-rw-r--r--keyboards/redox_media/readme.md (renamed from keyboards/redox/media/readme.md)2
-rw-r--r--keyboards/redox_media/redox_media.c (renamed from keyboards/redox/media/media.c)22
-rw-r--r--keyboards/redox_media/redox_media.h (renamed from keyboards/redox/media/media.h)2
-rw-r--r--keyboards/redox_media/rules.mk28
10 files changed, 51 insertions, 22 deletions
diff --git a/keyboards/redox/keymaps/media_ch/rules.mk b/keyboards/redox/keymaps/media_ch/rules.mk
deleted file mode 100644
index cf544bacba..0000000000
--- a/keyboards/redox/keymaps/media_ch/rules.mk
+++ /dev/null
@@ -1,2 +0,0 @@
-RGBLIGHT_ENABLE = no
-ENCODER_ENABLE = yes
diff --git a/keyboards/redox/media/rules.mk b/keyboards/redox/media/rules.mk
deleted file mode 100644
index e69de29bb2..0000000000
--- a/keyboards/redox/media/rules.mk
+++ /dev/null
diff --git a/keyboards/redox/media/config.h b/keyboards/redox_media/config.h
index 70fb2aa164..70fb2aa164 100644
--- a/keyboards/redox/media/config.h
+++ b/keyboards/redox_media/config.h
diff --git a/keyboards/redox/keymaps/media_ch/config.h b/keyboards/redox_media/keymaps/default/config.h
index 5da1f9060a..5da1f9060a 100644
--- a/keyboards/redox/keymaps/media_ch/config.h
+++ b/keyboards/redox_media/keymaps/default/config.h
diff --git a/keyboards/redox/keymaps/media_ch/keymap.c b/keyboards/redox_media/keymaps/default/keymap.c
index c3b8efb743..a8b479159f 100644
--- a/keyboards/redox/keymaps/media_ch/keymap.c
+++ b/keyboards/redox_media/keymaps/default/keymap.c
@@ -67,20 +67,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-
-bool encoder_update_user(uint8_t index, bool clockwise) {
- if (index == 0) { /* First encoder */
- if (clockwise) {
- tap_code(KC_VOLD);
- } else {
- tap_code(KC_VOLU);
- }
- } else if (index == 1) { /* Second encoder */
- if (clockwise) {
- tap_code(KC_WH_D);
- } else {
- tap_code(KC_WH_U);
- }
- }
- return false;
-}
diff --git a/keyboards/redox/keymaps/media_ch/readme.md b/keyboards/redox_media/keymaps/default/readme.md
index 53a080fd5a..53a080fd5a 100644
--- a/keyboards/redox/keymaps/media_ch/readme.md
+++ b/keyboards/redox_media/keymaps/default/readme.md
diff --git a/keyboards/redox/media/readme.md b/keyboards/redox_media/readme.md
index 1391feb908..511c604451 100644
--- a/keyboards/redox/media/readme.md
+++ b/keyboards/redox_media/readme.md
@@ -26,7 +26,7 @@ Obviously start by [installing QMK](https://docs.qmk.fm/#/getting_started_build_
- Before flashing the firmware you should make sure that it compiles. Thus assuring that your QMK setup works fine and the keyboard and keymap files are correct:
```
-qmk compile -kb redox/media -km media_ch
+qmk compile -kb redox_media -km default
```
The generated `.hex` file is output to the QMK root.
diff --git a/keyboards/redox/media/media.c b/keyboards/redox_media/redox_media.c
index 94fddb83e4..ca5a70dd49 100644
--- a/keyboards/redox/media/media.c
+++ b/keyboards/redox_media/redox_media.c
@@ -15,4 +15,24 @@ 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 "redox.h"
+#include "redox_media.h"
+
+bool encoder_update_kb(uint8_t index, bool clockwise) {
+ if (!encoder_update_user(index, clockwise)) {
+ return false;
+ }
+ if (index == 0) { /* First encoder */
+ if (clockwise) {
+ tap_code(KC_VOLD);
+ } else {
+ tap_code(KC_VOLU);
+ }
+ } else if (index == 1) { /* Second encoder */
+ if (clockwise) {
+ tap_code(KC_WH_D);
+ } else {
+ tap_code(KC_WH_U);
+ }
+ }
+ return true;
+}
diff --git a/keyboards/redox/media/media.h b/keyboards/redox_media/redox_media.h
index c2cbc10b47..6188aa9a10 100644
--- a/keyboards/redox/media/media.h
+++ b/keyboards/redox_media/redox_media.h
@@ -17,10 +17,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#include "redox.h"
#include "quantum.h"
// rows are doubled
+// clang-format off
#define LAYOUT( \
R5C6, R11C6, R11C5, \
R0C0, R0C1, R0C2, R0C3, R0C4, R0C5, R6C5, R6C4, R6C3, R6C2, R6C1, R6C0, \
diff --git a/keyboards/redox_media/rules.mk b/keyboards/redox_media/rules.mk
new file mode 100644
index 0000000000..9186485523
--- /dev/null
+++ b/keyboards/redox_media/rules.mk
@@ -0,0 +1,28 @@
+# MCU name
+MCU = atmega32u4
+
+# Bootloader selection
+BOOTLOADER = caterina
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
+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
+AUDIO_ENABLE = no # Audio output
+ENCODER_ENABLE = yes
+SPLIT_KEYBOARD = yes
+
+# Disable unsupported hardware
+AUDIO_SUPPORTED = no
+BACKLIGHT_SUPPORTED = no
+RGBLIGHT_SUPPORTED = no