diff options
| author | Drashna Jaelre <drashna@live.com> | 2021-09-11 23:21:28 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-11 23:21:28 -0700 |
| commit | f6a67c10bd0fe59d0b468ba870bb511d9787a34c (patch) | |
| tree | 2c15f6dfbbc06498d04b81cb8ab5cfcb8b8102ce /keyboards | |
| parent | 5af17997359d91ee0a7340d1e17514fe8c8a46f1 (diff) | |
| download | qmk_firmware-f6a67c10bd0fe59d0b468ba870bb511d9787a34c.tar.gz qmk_firmware-f6a67c10bd0fe59d0b468ba870bb511d9787a34c.zip | |
[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.mk | 2 | ||||
| -rw-r--r-- | keyboards/redox/media/rules.mk | 0 | ||||
| -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.mk | 28 |
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 cf544bacb..000000000 --- a/keyboards/redox/keymaps/media_ch/rules.mk +++ /dev/null | |||
| @@ -1,2 +0,0 @@ | |||
| 1 | RGBLIGHT_ENABLE = no | ||
| 2 | ENCODER_ENABLE = yes | ||
diff --git a/keyboards/redox/media/rules.mk b/keyboards/redox/media/rules.mk deleted file mode 100644 index e69de29bb..000000000 --- a/keyboards/redox/media/rules.mk +++ /dev/null | |||
diff --git a/keyboards/redox/media/config.h b/keyboards/redox_media/config.h index 70fb2aa16..70fb2aa16 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 5da1f9060..5da1f9060 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 c3b8efb74..a8b479159 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] = { | |||
| 67 | ) | 67 | ) |
| 68 | 68 | ||
| 69 | }; | 69 | }; |
| 70 | |||
| 71 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
| 72 | if (index == 0) { /* First encoder */ | ||
| 73 | if (clockwise) { | ||
| 74 | tap_code(KC_VOLD); | ||
| 75 | } else { | ||
| 76 | tap_code(KC_VOLU); | ||
| 77 | } | ||
| 78 | } else if (index == 1) { /* Second encoder */ | ||
| 79 | if (clockwise) { | ||
| 80 | tap_code(KC_WH_D); | ||
| 81 | } else { | ||
| 82 | tap_code(KC_WH_U); | ||
| 83 | } | ||
| 84 | } | ||
| 85 | return false; | ||
| 86 | } | ||
diff --git a/keyboards/redox/keymaps/media_ch/readme.md b/keyboards/redox_media/keymaps/default/readme.md index 53a080fd5..53a080fd5 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 1391feb90..511c60445 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_ | |||
| 26 | 26 | ||
| 27 | - 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: | 27 | - 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: |
| 28 | ``` | 28 | ``` |
| 29 | qmk compile -kb redox/media -km media_ch | 29 | qmk compile -kb redox_media -km default |
| 30 | ``` | 30 | ``` |
| 31 | The generated `.hex` file is output to the QMK root. | 31 | The generated `.hex` file is output to the QMK root. |
| 32 | 32 | ||
diff --git a/keyboards/redox/media/media.c b/keyboards/redox_media/redox_media.c index 94fddb83e..ca5a70dd4 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 | |||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | */ | 16 | */ |
| 17 | 17 | ||
| 18 | #include "redox.h" | 18 | #include "redox_media.h" |
| 19 | |||
| 20 | bool encoder_update_kb(uint8_t index, bool clockwise) { | ||
| 21 | if (!encoder_update_user(index, clockwise)) { | ||
| 22 | return false; | ||
| 23 | } | ||
| 24 | if (index == 0) { /* First encoder */ | ||
| 25 | if (clockwise) { | ||
| 26 | tap_code(KC_VOLD); | ||
| 27 | } else { | ||
| 28 | tap_code(KC_VOLU); | ||
| 29 | } | ||
| 30 | } else if (index == 1) { /* Second encoder */ | ||
| 31 | if (clockwise) { | ||
| 32 | tap_code(KC_WH_D); | ||
| 33 | } else { | ||
| 34 | tap_code(KC_WH_U); | ||
| 35 | } | ||
| 36 | } | ||
| 37 | return true; | ||
| 38 | } | ||
diff --git a/keyboards/redox/media/media.h b/keyboards/redox_media/redox_media.h index c2cbc10b4..6188aa9a1 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/>. | |||
| 17 | 17 | ||
| 18 | #pragma once | 18 | #pragma once |
| 19 | 19 | ||
| 20 | #include "redox.h" | ||
| 21 | #include "quantum.h" | 20 | #include "quantum.h" |
| 22 | 21 | ||
| 23 | // rows are doubled | 22 | // rows are doubled |
| 23 | // clang-format off | ||
| 24 | #define LAYOUT( \ | 24 | #define LAYOUT( \ |
| 25 | R5C6, R11C6, R11C5, \ | 25 | R5C6, R11C6, R11C5, \ |
| 26 | R0C0, R0C1, R0C2, R0C3, R0C4, R0C5, R6C5, R6C4, R6C3, R6C2, R6C1, R6C0, \ | 26 | 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 000000000..918648552 --- /dev/null +++ b/keyboards/redox_media/rules.mk | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32u4 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | BOOTLOADER = caterina | ||
| 6 | |||
| 7 | # Build Options | ||
| 8 | # change yes to no to disable | ||
| 9 | # | ||
| 10 | BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite | ||
| 11 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 13 | CONSOLE_ENABLE = no # Console for debug | ||
| 14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 15 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 16 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 17 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 18 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
| 19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 20 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
| 21 | AUDIO_ENABLE = no # Audio output | ||
| 22 | ENCODER_ENABLE = yes | ||
| 23 | SPLIT_KEYBOARD = yes | ||
| 24 | |||
| 25 | # Disable unsupported hardware | ||
| 26 | AUDIO_SUPPORTED = no | ||
| 27 | BACKLIGHT_SUPPORTED = no | ||
| 28 | RGBLIGHT_SUPPORTED = no | ||
