From 8d7986423d83695d8a4800a57f17cd6a64670f4b Mon Sep 17 00:00:00 2001 From: shiftux Date: Wed, 2 Jun 2021 14:13:56 +0200 Subject: [PATCH 01/19] adding a new revision 'media' to the redox keyboard --- keyboards/redox/keymaps/media-CH/config.h | 30 +++++++++ keyboards/redox/keymaps/media-CH/keymap.c | 78 ++++++++++++++++++++++ keyboards/redox/keymaps/media-CH/readme.md | 5 ++ keyboards/redox/keymaps/media-CH/rules.mk | 2 + keyboards/redox/media/README.md | 65 ++++++++++++++++++ keyboards/redox/media/config.h | 61 +++++++++++++++++ keyboards/redox/media/media.c | 22 ++++++ keyboards/redox/media/media.h | 39 +++++++++++ keyboards/redox/media/rules.mk | 0 9 files changed, 302 insertions(+) create mode 100644 keyboards/redox/keymaps/media-CH/config.h create mode 100644 keyboards/redox/keymaps/media-CH/keymap.c create mode 100644 keyboards/redox/keymaps/media-CH/readme.md create mode 100644 keyboards/redox/keymaps/media-CH/rules.mk create mode 100644 keyboards/redox/media/README.md create mode 100644 keyboards/redox/media/config.h create mode 100644 keyboards/redox/media/media.c create mode 100644 keyboards/redox/media/media.h create mode 100644 keyboards/redox/media/rules.mk diff --git a/keyboards/redox/keymaps/media-CH/config.h b/keyboards/redox/keymaps/media-CH/config.h new file mode 100644 index 000000000000..c6e78f316a15 --- /dev/null +++ b/keyboards/redox/keymaps/media-CH/config.h @@ -0,0 +1,30 @@ +/* +Copyright 2021 Shiftux + +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 . +*/ + +#pragma once + +/* Use I2C or Serial, not both */ +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ +#define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS + +#define SPLIT_USB_DETECT +#define SPLIT_USB_TIMEOUT 2000 diff --git a/keyboards/redox/keymaps/media-CH/keymap.c b/keyboards/redox/keymaps/media-CH/keymap.c new file mode 100644 index 000000000000..ec11ef933ac1 --- /dev/null +++ b/keyboards/redox/keymaps/media-CH/keymap.c @@ -0,0 +1,78 @@ +#include QMK_KEYBOARD_H +#include "../../media/media.h" + +extern keymap_config_t keymap_config; + +#define _QWERTZ 0 // standard layer +#define _SYMB 1 // symbols layer + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + debug_enable=true; + debug_matrix=true; + debug_keyboard=true; + //debug_mouse=true; +}; + +enum custom_keycodes { + QWERTZ = SAFE_RANGE, + SYMB, +}; + +// Shortcut to make keymap more readable +#define KC_BKSL KC_BSLASH +#define SYM_L MO(_SYMB) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTZ] = LAYOUT( + // ┌────────┐ ┌────────┬────────┐ + KC_MUTE, KC_MPLY, KC_MNXT, + //┌────────┬────────┬────────┬───┼────┬───┼────┬────────┐ ┌──┼─────┬──┼─────┬──┼─────┬────────┬────────┬────────┐ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NUBS, KC_MINS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_EQL, KC_RBRC, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGDN, KC_PGUP, KC_HOME, KC_END, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + KC_LCTL, SYM_L, KC_LALT, KC_GRV, KC_DEL, KC_LGUI, KC_SPC, KC_ENT, KC_SPC, KC_RALT, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ), + + + [_SYMB] = LAYOUT( + // ┌────────┐ ┌────────┬────────┐ + KC_MPRV, XXXXXXX, XXXXXXX, + //┌────────┬────────┬────────┬───┼────┬───┼────┬────────┐ ┌──┼─────┬──┼─────┬──┼─────┬────────┬────────┬────────┐ + RESET ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5, KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11 , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,KC_F12 , XXXXXXX ,XXXXXXX ,XXXXXXX, KC_UP ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX, XXXXXXX ,XXXXXXX ,KC_TILD ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , + //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ + XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX + //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ + ) + +}; + +void 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); + } + } +} diff --git a/keyboards/redox/keymaps/media-CH/readme.md b/keyboards/redox/keymaps/media-CH/readme.md new file mode 100644 index 000000000000..91bc230fca66 --- /dev/null +++ b/keyboards/redox/keymaps/media-CH/readme.md @@ -0,0 +1,5 @@ +# German keymap for Redox + +The layout acommodates the German umlauts and the punctuation symbols +at their usual positions relative to the other alphabetic characters. +Apart from that it stays close to the default english redox layout. diff --git a/keyboards/redox/keymaps/media-CH/rules.mk b/keyboards/redox/keymaps/media-CH/rules.mk new file mode 100644 index 000000000000..cf544bacba3b --- /dev/null +++ b/keyboards/redox/keymaps/media-CH/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE = no +ENCODER_ENABLE = yes diff --git a/keyboards/redox/media/README.md b/keyboards/redox/media/README.md new file mode 100644 index 000000000000..47ae3f147d65 --- /dev/null +++ b/keyboards/redox/media/README.md @@ -0,0 +1,65 @@ +# The Redox Media Keyboard + +I've taken the Redox keyboard and modified the SCAD files as well as the QMK layout to include media and scroll features: +- 3 Media buttons + - Play / Pause button + - Next track + - Mute (previous track on secondary layout) +- Volume knob +- Scroll wheel on the keyboard + +For an in-depth report and video see [my page](https://shiftux.org/making_projects/keyboard.html). + +## IMAGE + +### The build +I've used 2 [Sparkfun Pro Micros (5V)](https://www.sparkfun.com/products/12640) and a single hand master setup providing power and serial connection via a TRS jack. + +### The pro micro and how to flash it +To try out your pro micro and setup your environment to flash such a device I recommend following [this guide](https://learn.sparkfun.com/tutorials/pro-micro--fio-v3-hookup-guide/all). It will take you through the install and setup and provides a first easy to flash program so you can test your setup quickly. + +Whenever you can't program one of the pro micros or the USB-COM port is not found on your computer, it most probably means that is is not in "bootloader mode". What you want to do is connect the GND and RST pin twice to reset the device and put it into bootloader mode (details [here](https://learn.sparkfun.com/tutorials/pro-micro--fio-v3-hookup-guide/troubleshooting-and-faq#ts-serial)). + +To find out how your serial port is called on your computer, you can find it with the following command: +``` +ll /dev | grep "tty\." +``` +Mine is called `/dev/tty.usbmodem14522301` for example. + +### Compiling and flashing + +Obviously start by [installing QMK](https://docs.qmk.fm/#/getting_started_build_tools?id=set-up-your-environment). + +Once you are comfortable flashing your Pro Micros and your setup works continue with the following steps: + +- I've had greatest success with using the `EE_HANDS` setting and flashing the EEPROM to indentify left and right halves of the keyboard. To do this start with flashing the EEPROM of the 2 pro micros (make sure the COM port is the correct one and change left to right hand for other half) Reset the device: connect GND to RST twice, then you have 8 seconds to upload the new eep file with this command (from the qmk root). From the root of the QMK repo: +``` +avrdude -c avr109 -p m32u4 -P /dev/tty.usbmodem14522301 -U eeprom:w:"./quantum/split_common/eeprom-lefthand.eep":a +``` + +- Next compile the firmware from the qmk repo root: +``` +qmk compile -kb redox/media -km media-CH +``` +The generated files are output to the `.build` directory. You'll want the `.hex` file. +- Finally flash the generated hex (make sure the COM port is the correct one) from the QMK root: +``` +avrdude -p atmega32u4 -c avr109 -U flash:w:./.build/redox_media_media.hex:i -P /dev/tty.usbmodem14522301 +``` + +### Adapting the keyboard layout + +Copy the `keymaps/media-CH` folder to `keymaps/media-` and adapt the `keymap.c` file in there. + +I recommend testing the key codes with the [QMK tester](https://config.qmk.fm/#/test) and then adapting the `keymap.c` file accordingly. + +Finally compile your new layout from the QMK root with: +``` +qmk compile -kb redox/media -km media- +``` +and proceed to flashing it equivalent to the above instructions. + +### CAD files and additional resources +See [here](https://shiftux.org/making_projects/keyboard.html) for a detailed build description and video. + +You can find the CAD and SCAD files, I created here: https://github.com/shiftux/redox-media-keyboard \ No newline at end of file diff --git a/keyboards/redox/media/config.h b/keyboards/redox/media/config.h new file mode 100644 index 000000000000..8b6961f26edb --- /dev/null +++ b/keyboards/redox/media/config.h @@ -0,0 +1,61 @@ +/* +Copyright 2021 Shiftux + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0100 +#define MANUFACTURER shiftux +#define PRODUCT The Redox Keyboard +#define DESCRIPTION Split Ergodox-like 5x7 custom keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 12 +#define MATRIX_COLS 7 + +// wiring of each half +#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6, D1 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D0 + +/* 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 ENCODERS_PAD_A { F4 } +#define ENCODERS_PAD_B { F5 } +#define ENCODER_RESOLUTION 4 \ No newline at end of file diff --git a/keyboards/redox/media/media.c b/keyboards/redox/media/media.c new file mode 100644 index 000000000000..2eb7c7c0e835 --- /dev/null +++ b/keyboards/redox/media/media.c @@ -0,0 +1,22 @@ +#include "redox.h" + + +#ifdef SSD1306OLED +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + led_set_user(usb_led); +} +#endif + +void matrix_init_kb(void) { + + // // green led on + // DDRD |= (1<<5); + // PORTD &= ~(1<<5); + + // // orange led on + // DDRB |= (1<<0); + // PORTB &= ~(1<<0); + + matrix_init_user(); +}; diff --git a/keyboards/redox/media/media.h b/keyboards/redox/media/media.h new file mode 100644 index 000000000000..8efc6ff7e231 --- /dev/null +++ b/keyboards/redox/media/media.h @@ -0,0 +1,39 @@ +#pragma once + +#include "../redox.h" + +#include "quantum.h" + + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +// rows are doubled +#define LAYOUT( \ + R5C6, R11C6, R11C5, \ + R0C0, R0C1, R0C2, R0C3, R0C4, R0C5, R6C5, R6C4, R6C3, R6C2, R6C1, R6C0, \ + R1C0, R1C1, R1C2, R1C3, R1C4, R1C5, R0C6, R6C6, R7C5, R7C4, R7C3, R7C2, R7C1, R7C0, \ + R2C0, R2C1, R2C2, R2C3, R2C4, R2C5, R1C6, R7C6, R8C5, R8C4, R8C3, R8C2, R8C1, R8C0, \ + R3C0, R3C1, R3C2, R3C3, R3C4, R3C5, R2C6, R3C6, R9C6, R8C6, R9C5, R9C4, R9C3, R9C2, R9C1, R9C0, \ + R4C0, R4C1, R4C2, R4C3, R4C4, R4C5, R4C6, R10C6, R10C5, R10C4, R10C3, R10C2, R10C1, R10C0 \ +) \ +{ \ + { R0C0, R0C1, R0C2, R0C3, R0C4, R0C5, R0C6 }, \ + { R1C0, R1C1, R1C2, R1C3, R1C4, R1C5, R1C6 }, \ + { R2C0, R2C1, R2C2, R2C3, R2C4, R2C5, R2C6 }, \ + { R3C0, R3C1, R3C2, R3C3, R3C4, R3C5, R3C6 }, \ + { R4C0, R4C1, R4C2, R4C3, R4C4, R4C5, R4C6 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, R5C6 }, \ +\ + { R6C0, R6C1, R6C2, R6C3, R6C4, R6C5, R6C6 }, \ + { R7C0, R7C1, R7C2, R7C3, R7C4, R7C5, R7C6 }, \ + { R8C0, R8C1, R8C2, R8C3, R8C4, R8C5, R8C6 }, \ + { R9C0, R9C1, R9C2, R9C3, R9C4, R9C5, R9C6 }, \ + { R10C0, R10C1, R10C2, R10C3, R10C4, R10C5, R10C6 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, R11C5, R11C6 } \ +} diff --git a/keyboards/redox/media/rules.mk b/keyboards/redox/media/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 From 32f6eb49067ba3f26e5b4b73104c4745f0bae429 Mon Sep 17 00:00:00 2001 From: shiftux Date: Wed, 2 Jun 2021 14:22:11 +0200 Subject: [PATCH 02/19] readme update --- keyboards/redox/keymaps/media-CH/readme.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/keyboards/redox/keymaps/media-CH/readme.md b/keyboards/redox/keymaps/media-CH/readme.md index 91bc230fca66..e43e1403589f 100644 --- a/keyboards/redox/keymaps/media-CH/readme.md +++ b/keyboards/redox/keymaps/media-CH/readme.md @@ -1,5 +1,6 @@ # German keymap for Redox +A layout for the Redox MEDIA revision. The layout acommodates the German umlauts and the punctuation symbols at their usual positions relative to the other alphabetic characters. -Apart from that it stays close to the default english redox layout. +Apart from that it stays close to the default english Redox layout. From 5c125ba20b0d66a8917c2bba4bf0f31db85bc799 Mon Sep 17 00:00:00 2001 From: shiftux Date: Wed, 2 Jun 2021 22:47:32 +0200 Subject: [PATCH 03/19] encoder fix --- keyboards/redox/keymaps/media-CH/keymap.c | 29 ++++++++++++----------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/keyboards/redox/keymaps/media-CH/keymap.c b/keyboards/redox/keymaps/media-CH/keymap.c index ec11ef933ac1..42b15c3e1db3 100644 --- a/keyboards/redox/keymaps/media-CH/keymap.c +++ b/keyboards/redox/keymaps/media-CH/keymap.c @@ -61,18 +61,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -void 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); - } - } +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; } From 0a53a4a6893196d30d5f7bb91fa2de519296372b Mon Sep 17 00:00:00 2001 From: shiftux Date: Sun, 6 Jun 2021 12:29:52 +0200 Subject: [PATCH 04/19] video link --- keyboards/redox/media/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/redox/media/README.md b/keyboards/redox/media/README.md index 47ae3f147d65..c7cfdb2d7735 100644 --- a/keyboards/redox/media/README.md +++ b/keyboards/redox/media/README.md @@ -8,7 +8,7 @@ I've taken the Redox keyboard and modified the SCAD files as well as the QMK lay - Volume knob - Scroll wheel on the keyboard -For an in-depth report and video see [my page](https://shiftux.org/making_projects/keyboard.html). +For an in-depth report see [my page](https://shiftux.org/making_projects/keyboard.html) and a [video](https://youtu.be/Cwkf7HFcUkY) about the build process, design, printing, programing and assembly. ## IMAGE From 9dc44b3500728758d52519a82698d1e8970459a1 Mon Sep 17 00:00:00 2001 From: shiftux Date: Mon, 7 Jun 2021 08:56:32 +0200 Subject: [PATCH 05/19] drashna change requests --- keyboards/redox/keymaps/media-CH/keymap.c | 19 ++++++++++++-- keyboards/redox/media/config.h | 1 - keyboards/redox/media/media.c | 32 ++++++++++------------- keyboards/redox/media/media.h | 28 +++++++++++++------- 4 files changed, 49 insertions(+), 31 deletions(-) diff --git a/keyboards/redox/keymaps/media-CH/keymap.c b/keyboards/redox/keymaps/media-CH/keymap.c index 42b15c3e1db3..6debc1787f8d 100644 --- a/keyboards/redox/keymaps/media-CH/keymap.c +++ b/keyboards/redox/keymaps/media-CH/keymap.c @@ -1,8 +1,23 @@ +/* +Copyright 2021 Shiftux + +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 . +*/ + #include QMK_KEYBOARD_H #include "../../media/media.h" -extern keymap_config_t keymap_config; - #define _QWERTZ 0 // standard layer #define _SYMB 1 // symbols layer diff --git a/keyboards/redox/media/config.h b/keyboards/redox/media/config.h index 8b6961f26edb..70fb2aa16490 100644 --- a/keyboards/redox/media/config.h +++ b/keyboards/redox/media/config.h @@ -25,7 +25,6 @@ along with this program. If not, see . #define DEVICE_VER 0x0100 #define MANUFACTURER shiftux #define PRODUCT The Redox Keyboard -#define DESCRIPTION Split Ergodox-like 5x7 custom keyboard /* key matrix size */ // Rows are doubled-up diff --git a/keyboards/redox/media/media.c b/keyboards/redox/media/media.c index 2eb7c7c0e835..94fddb83e4fb 100644 --- a/keyboards/redox/media/media.c +++ b/keyboards/redox/media/media.c @@ -1,22 +1,18 @@ -#include "redox.h" - +/* +Copyright 2021 Shiftux -#ifdef SSD1306OLED -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - led_set_user(usb_led); -} -#endif +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. -void matrix_init_kb(void) { +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. - // // green led on - // DDRD |= (1<<5); - // PORTD &= ~(1<<5); +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ - // // orange led on - // DDRB |= (1<<0); - // PORTB &= ~(1<<0); - - matrix_init_user(); -}; +#include "redox.h" diff --git a/keyboards/redox/media/media.h b/keyboards/redox/media/media.h index 8efc6ff7e231..31d4d7adfd53 100644 --- a/keyboards/redox/media/media.h +++ b/keyboards/redox/media/media.h @@ -1,17 +1,25 @@ -#pragma once +/* +Copyright 2021 Shiftux -#include "../redox.h" +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. -#include "quantum.h" +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 . +*/ +#pragma once + +#include "redox.h" -#ifdef USE_I2C -#include -#ifdef __AVR__ - #include - #include -#endif -#endif +#include "quantum.h" // rows are doubled #define LAYOUT( \ From 34cda54326f1a7a1df486218714f5062158ea160 Mon Sep 17 00:00:00 2001 From: shiftux Date: Mon, 7 Jun 2021 10:22:22 +0200 Subject: [PATCH 06/19] removing SPLIT_USB_TIMEOUT --- keyboards/redox/keymaps/media-CH/config.h | 1 - 1 file changed, 1 deletion(-) diff --git a/keyboards/redox/keymaps/media-CH/config.h b/keyboards/redox/keymaps/media-CH/config.h index c6e78f316a15..533456f2c024 100644 --- a/keyboards/redox/keymaps/media-CH/config.h +++ b/keyboards/redox/keymaps/media-CH/config.h @@ -27,4 +27,3 @@ along with this program. If not, see . #define EE_HANDS #define SPLIT_USB_DETECT -#define SPLIT_USB_TIMEOUT 2000 From e4bee1dcdd495f83b4795e8b26e73fac13aea811 Mon Sep 17 00:00:00 2001 From: shiftux Date: Thu, 17 Jun 2021 08:28:50 +0200 Subject: [PATCH 07/19] intermediate rename --- keyboards/redox/keymaps/{media-CH => media-xx}/config.h | 0 keyboards/redox/keymaps/{media-CH => media-xx}/keymap.c | 2 +- keyboards/redox/keymaps/{media-CH => media-xx}/readme.md | 0 keyboards/redox/keymaps/{media-CH => media-xx}/rules.mk | 0 4 files changed, 1 insertion(+), 1 deletion(-) rename keyboards/redox/keymaps/{media-CH => media-xx}/config.h (100%) rename keyboards/redox/keymaps/{media-CH => media-xx}/keymap.c (99%) rename keyboards/redox/keymaps/{media-CH => media-xx}/readme.md (100%) rename keyboards/redox/keymaps/{media-CH => media-xx}/rules.mk (100%) diff --git a/keyboards/redox/keymaps/media-CH/config.h b/keyboards/redox/keymaps/media-xx/config.h similarity index 100% rename from keyboards/redox/keymaps/media-CH/config.h rename to keyboards/redox/keymaps/media-xx/config.h diff --git a/keyboards/redox/keymaps/media-CH/keymap.c b/keyboards/redox/keymaps/media-xx/keymap.c similarity index 99% rename from keyboards/redox/keymaps/media-CH/keymap.c rename to keyboards/redox/keymaps/media-xx/keymap.c index 6debc1787f8d..1301aa15aca4 100644 --- a/keyboards/redox/keymaps/media-CH/keymap.c +++ b/keyboards/redox/keymaps/media-xx/keymap.c @@ -66,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,KC_F12 , XXXXXXX ,XXXXXXX ,XXXXXXX, KC_UP ,XXXXXXX ,XXXXXXX ,XXXXXXX , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT ,XXXXXXX ,XXXXXXX , + XXXXXXX ,XXXXXXX ,KC_BSLS ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX ,XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT ,XXXXXXX ,XXXXXXX , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX, XXXXXXX ,XXXXXXX ,KC_TILD ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ diff --git a/keyboards/redox/keymaps/media-CH/readme.md b/keyboards/redox/keymaps/media-xx/readme.md similarity index 100% rename from keyboards/redox/keymaps/media-CH/readme.md rename to keyboards/redox/keymaps/media-xx/readme.md diff --git a/keyboards/redox/keymaps/media-CH/rules.mk b/keyboards/redox/keymaps/media-xx/rules.mk similarity index 100% rename from keyboards/redox/keymaps/media-CH/rules.mk rename to keyboards/redox/keymaps/media-xx/rules.mk From dfec9aa2436fc17d53672992c72f52193d6b96fc Mon Sep 17 00:00:00 2001 From: shiftux Date: Thu, 17 Jun 2021 08:29:50 +0200 Subject: [PATCH 08/19] lowercase --- keyboards/redox/keymaps/{media-xx => media-ch}/config.h | 0 keyboards/redox/keymaps/{media-xx => media-ch}/keymap.c | 0 keyboards/redox/keymaps/{media-xx => media-ch}/readme.md | 0 keyboards/redox/keymaps/{media-xx => media-ch}/rules.mk | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename keyboards/redox/keymaps/{media-xx => media-ch}/config.h (100%) rename keyboards/redox/keymaps/{media-xx => media-ch}/keymap.c (100%) rename keyboards/redox/keymaps/{media-xx => media-ch}/readme.md (100%) rename keyboards/redox/keymaps/{media-xx => media-ch}/rules.mk (100%) diff --git a/keyboards/redox/keymaps/media-xx/config.h b/keyboards/redox/keymaps/media-ch/config.h similarity index 100% rename from keyboards/redox/keymaps/media-xx/config.h rename to keyboards/redox/keymaps/media-ch/config.h diff --git a/keyboards/redox/keymaps/media-xx/keymap.c b/keyboards/redox/keymaps/media-ch/keymap.c similarity index 100% rename from keyboards/redox/keymaps/media-xx/keymap.c rename to keyboards/redox/keymaps/media-ch/keymap.c diff --git a/keyboards/redox/keymaps/media-xx/readme.md b/keyboards/redox/keymaps/media-ch/readme.md similarity index 100% rename from keyboards/redox/keymaps/media-xx/readme.md rename to keyboards/redox/keymaps/media-ch/readme.md diff --git a/keyboards/redox/keymaps/media-xx/rules.mk b/keyboards/redox/keymaps/media-ch/rules.mk similarity index 100% rename from keyboards/redox/keymaps/media-xx/rules.mk rename to keyboards/redox/keymaps/media-ch/rules.mk From 78265c5fea56fdc6f7e82216fed84e055edee7e1 Mon Sep 17 00:00:00 2001 From: shiftux Date: Thu, 17 Jun 2021 08:37:07 +0200 Subject: [PATCH 09/19] drashna comments --- keyboards/redox/keymaps/media-ch/config.h | 4 +--- keyboards/redox/keymaps/media-ch/keymap.c | 6 ++++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/redox/keymaps/media-ch/config.h b/keyboards/redox/keymaps/media-ch/config.h index 533456f2c024..5323c5f8fd10 100644 --- a/keyboards/redox/keymaps/media-ch/config.h +++ b/keyboards/redox/keymaps/media-ch/config.h @@ -24,6 +24,4 @@ along with this program. If not, see . /* Select hand configuration */ #define MASTER_LEFT // #define MASTER_RIGHT -#define EE_HANDS - -#define SPLIT_USB_DETECT +#define EE_HANDS \ No newline at end of file diff --git a/keyboards/redox/keymaps/media-ch/keymap.c b/keyboards/redox/keymaps/media-ch/keymap.c index 1301aa15aca4..a472945a8062 100644 --- a/keyboards/redox/keymaps/media-ch/keymap.c +++ b/keyboards/redox/keymaps/media-ch/keymap.c @@ -18,8 +18,10 @@ along with this program. If not, see . #include QMK_KEYBOARD_H #include "../../media/media.h" -#define _QWERTZ 0 // standard layer -#define _SYMB 1 // symbols layer +enum layers { + _QWERTZ, // standard layer + _SYMB, // symbols layer +}; void keyboard_post_init_user(void) { // Customise these values to desired behaviour From caffbb6e3a28cecd8d7e7fdcb87fdced9041ce32 Mon Sep 17 00:00:00 2001 From: shiftux Date: Thu, 17 Jun 2021 19:23:52 +0200 Subject: [PATCH 10/19] include if defined KEYBOARD_redox_media --- keyboards/redox/media/media.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/keyboards/redox/media/media.h b/keyboards/redox/media/media.h index 31d4d7adfd53..df4938ebecc7 100644 --- a/keyboards/redox/media/media.h +++ b/keyboards/redox/media/media.h @@ -18,8 +18,10 @@ along with this program. If not, see . #pragma once #include "redox.h" - #include "quantum.h" +#if defined(KEYBOARD_redox_media) +# include "media.h" +#endif // rows are doubled #define LAYOUT( \ From 8afa4cfb67454936b63bd0fc8db1ca8d3f3e607e Mon Sep 17 00:00:00 2001 From: shiftux Date: Sun, 20 Jun 2021 10:18:33 +0200 Subject: [PATCH 11/19] lowercase readme, tmp step --- keyboards/redox/media/{README.md => tmp.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename keyboards/redox/media/{README.md => tmp.md} (100%) diff --git a/keyboards/redox/media/README.md b/keyboards/redox/media/tmp.md similarity index 100% rename from keyboards/redox/media/README.md rename to keyboards/redox/media/tmp.md From 79e2531e20b1a32b1ff6cdb7aa0c9a6b45102daa Mon Sep 17 00:00:00 2001 From: shiftux Date: Sun, 20 Jun 2021 10:19:00 +0200 Subject: [PATCH 12/19] lowercase readme --- keyboards/redox/media/{tmp.md => readme.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename keyboards/redox/media/{tmp.md => readme.md} (100%) diff --git a/keyboards/redox/media/tmp.md b/keyboards/redox/media/readme.md similarity index 100% rename from keyboards/redox/media/tmp.md rename to keyboards/redox/media/readme.md From 6690098f8c067b09e48388f5a220d963fb7874c7 Mon Sep 17 00:00:00 2001 From: shiftux Date: Mon, 28 Jun 2021 08:32:21 +0200 Subject: [PATCH 13/19] drashna changes --- keyboards/redox/keymaps/media-ch/keymap.c | 1 - keyboards/redox/media/media.h | 3 --- keyboards/redox/redox.h | 6 ++++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/keyboards/redox/keymaps/media-ch/keymap.c b/keyboards/redox/keymaps/media-ch/keymap.c index a472945a8062..9ef16176cd81 100644 --- a/keyboards/redox/keymaps/media-ch/keymap.c +++ b/keyboards/redox/keymaps/media-ch/keymap.c @@ -16,7 +16,6 @@ along with this program. If not, see . */ #include QMK_KEYBOARD_H -#include "../../media/media.h" enum layers { _QWERTZ, // standard layer diff --git a/keyboards/redox/media/media.h b/keyboards/redox/media/media.h index df4938ebecc7..c2cbc10b476e 100644 --- a/keyboards/redox/media/media.h +++ b/keyboards/redox/media/media.h @@ -19,9 +19,6 @@ along with this program. If not, see . #include "redox.h" #include "quantum.h" -#if defined(KEYBOARD_redox_media) -# include "media.h" -#endif // rows are doubled #define LAYOUT( \ diff --git a/keyboards/redox/redox.h b/keyboards/redox/redox.h index 2f08bddccc38..4160096b28f9 100644 --- a/keyboards/redox/redox.h +++ b/keyboards/redox/redox.h @@ -16,8 +16,10 @@ #pragma once -#ifdef KEYBOARD_redox_rev1 - #include "rev1.h" +#if defined(KEYBOARD_redox_rev1) +# include "rev1.h" +#elif defined(KEYBOARD_redox_media) +# include "media.h" #endif #include "quantum.h" From af877d3bc6b7ba18dfcf9fb43b7121464f62fcfd Mon Sep 17 00:00:00 2001 From: shiftux Date: Wed, 14 Jul 2021 09:47:24 +0200 Subject: [PATCH 14/19] more drashna comments --- keyboards/redox/keymaps/media-ch/keymap.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/keyboards/redox/keymaps/media-ch/keymap.c b/keyboards/redox/keymaps/media-ch/keymap.c index 9ef16176cd81..c3b8efb74305 100644 --- a/keyboards/redox/keymaps/media-ch/keymap.c +++ b/keyboards/redox/keymaps/media-ch/keymap.c @@ -22,14 +22,6 @@ enum layers { _SYMB, // symbols layer }; -void keyboard_post_init_user(void) { - // Customise these values to desired behaviour - debug_enable=true; - debug_matrix=true; - debug_keyboard=true; - //debug_mouse=true; -}; - enum custom_keycodes { QWERTZ = SAFE_RANGE, SYMB, @@ -39,7 +31,6 @@ enum custom_keycodes { #define KC_BKSL KC_BSLASH #define SYM_L MO(_SYMB) - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTZ] = LAYOUT( From 0af0a54a5a25a7484470d4233b59040d6c126833 Mon Sep 17 00:00:00 2001 From: shiftux Date: Thu, 15 Jul 2021 08:44:12 +0200 Subject: [PATCH 15/19] readme update --- keyboards/redox/media/readme.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/keyboards/redox/media/readme.md b/keyboards/redox/media/readme.md index c7cfdb2d7735..59ba548931a7 100644 --- a/keyboards/redox/media/readme.md +++ b/keyboards/redox/media/readme.md @@ -42,7 +42,11 @@ avrdude -c avr109 -p m32u4 -P /dev/tty.usbmodem14522301 -U eeprom:w:"./quantum/s qmk compile -kb redox/media -km media-CH ``` The generated files are output to the `.build` directory. You'll want the `.hex` file. -- Finally flash the generated hex (make sure the COM port is the correct one) from the QMK root: +- Finally flash the generated hex. You can go ahead and try to use the comfortable QMK flash command: +``` +qmk flash +``` +or use the more explicit command invoking avrdude (make sure the COM port is the correct one) from the QMK root: ``` avrdude -p atmega32u4 -c avr109 -U flash:w:./.build/redox_media_media.hex:i -P /dev/tty.usbmodem14522301 ``` From 38520e8d9dc03b922954c16087f1ca8a532e672e Mon Sep 17 00:00:00 2001 From: shiftux Date: Thu, 15 Jul 2021 08:44:59 +0200 Subject: [PATCH 16/19] readme update --- keyboards/redox/media/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/redox/media/readme.md b/keyboards/redox/media/readme.md index 59ba548931a7..b9ad28bc1b39 100644 --- a/keyboards/redox/media/readme.md +++ b/keyboards/redox/media/readme.md @@ -46,7 +46,7 @@ The generated files are output to the `.build` directory. You'll want the `.hex` ``` qmk flash ``` -or use the more explicit command invoking avrdude (make sure the COM port is the correct one) from the QMK root: +or use the more explicit command invoking avrdude from the QMK root (make sure the COM port is the correct one): ``` avrdude -p atmega32u4 -c avr109 -U flash:w:./.build/redox_media_media.hex:i -P /dev/tty.usbmodem14522301 ``` From 22843a1016ae25fe9c015d565848c11321f539c5 Mon Sep 17 00:00:00 2001 From: shiftux Date: Fri, 16 Jul 2021 10:19:36 +0200 Subject: [PATCH 17/19] fauxpark and drashna comments --- keyboards/redox/keymaps/media-ch/config.h | 3 +-- keyboards/redox/media/readme.md | 23 +++++++++++------------ 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/keyboards/redox/keymaps/media-ch/config.h b/keyboards/redox/keymaps/media-ch/config.h index 5323c5f8fd10..5da1f9060a7c 100644 --- a/keyboards/redox/keymaps/media-ch/config.h +++ b/keyboards/redox/keymaps/media-ch/config.h @@ -22,6 +22,5 @@ along with this program. If not, see . // #define USE_I2C /* Select hand configuration */ -#define MASTER_LEFT -// #define MASTER_RIGHT +// #define MASTER_LEFT #define EE_HANDS \ No newline at end of file diff --git a/keyboards/redox/media/readme.md b/keyboards/redox/media/readme.md index b9ad28bc1b39..3c5acd6c8f87 100644 --- a/keyboards/redox/media/readme.md +++ b/keyboards/redox/media/readme.md @@ -30,23 +30,22 @@ Mine is called `/dev/tty.usbmodem14522301` for example. Obviously start by [installing QMK](https://docs.qmk.fm/#/getting_started_build_tools?id=set-up-your-environment). -Once you are comfortable flashing your Pro Micros and your setup works continue with the following steps: - -- I've had greatest success with using the `EE_HANDS` setting and flashing the EEPROM to indentify left and right halves of the keyboard. To do this start with flashing the EEPROM of the 2 pro micros (make sure the COM port is the correct one and change left to right hand for other half) Reset the device: connect GND to RST twice, then you have 8 seconds to upload the new eep file with this command (from the qmk root). From the root of the QMK repo: -``` -avrdude -c avr109 -p m32u4 -P /dev/tty.usbmodem14522301 -U eeprom:w:"./quantum/split_common/eeprom-lefthand.eep":a -``` - -- Next compile the firmware from the qmk repo root: +- 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 ``` -The generated files are output to the `.build` directory. You'll want the `.hex` file. -- Finally flash the generated hex. You can go ahead and try to use the comfortable QMK flash command: +The generated files are output to the `.build` directory in the QMK root. You'll want the `.hex` file. + +Once you are comfortable flashing your Pro Micros and your setup works continue with the following steps: + +- I've had the most success with using the `EE_HANDS` setting and flashing the EEPROM to the left and right halves of the keyboard respectively. To do this start with flashing the EEPROM of the 2 pro micros separately by setting the bootloader flag in the flash command (the pro micro uses the avrdude bootloader): ``` -qmk flash +qmk flash -kb redox/media -km media-CH -bl avrdude-split-left +qmk flash -kb redox/media -km media-CH -bl avrdude-split-right ``` -or use the more explicit command invoking avrdude from the QMK root (make sure the COM port is the correct one): +Note that you need to reset the pro micro to set it to bootloader mode before you can flash it: connect GND to RST twice in quick succession (750ms), then you have 8 seconds to upload the new eep file. + +- For completeness this is the avrdude command with which you could manually do the flashing steps, you might want to use it for debugging. Make sure to set the correct port for flashing (`ll /dev | grep "tty\."`): ``` avrdude -p atmega32u4 -c avr109 -U flash:w:./.build/redox_media_media.hex:i -P /dev/tty.usbmodem14522301 ``` From 26d69919ef32a999dbfe30ab1f0df61c0af0cac9 Mon Sep 17 00:00:00 2001 From: Shiftux Date: Tue, 3 Aug 2021 13:10:38 +0200 Subject: [PATCH 18/19] fauxpark comments --- .../keymaps/{media-ch => media_ch}/config.h | 0 .../keymaps/{media-ch => media_ch}/keymap.c | 0 .../keymaps/{media-ch => media_ch}/readme.md | 2 +- .../keymaps/{media-ch => media_ch}/rules.mk | 0 keyboards/redox/media/readme.md | 23 +++++-------------- 5 files changed, 7 insertions(+), 18 deletions(-) rename keyboards/redox/keymaps/{media-ch => media_ch}/config.h (100%) rename keyboards/redox/keymaps/{media-ch => media_ch}/keymap.c (100%) rename keyboards/redox/keymaps/{media-ch => media_ch}/readme.md (88%) rename keyboards/redox/keymaps/{media-ch => media_ch}/rules.mk (100%) diff --git a/keyboards/redox/keymaps/media-ch/config.h b/keyboards/redox/keymaps/media_ch/config.h similarity index 100% rename from keyboards/redox/keymaps/media-ch/config.h rename to keyboards/redox/keymaps/media_ch/config.h diff --git a/keyboards/redox/keymaps/media-ch/keymap.c b/keyboards/redox/keymaps/media_ch/keymap.c similarity index 100% rename from keyboards/redox/keymaps/media-ch/keymap.c rename to keyboards/redox/keymaps/media_ch/keymap.c diff --git a/keyboards/redox/keymaps/media-ch/readme.md b/keyboards/redox/keymaps/media_ch/readme.md similarity index 88% rename from keyboards/redox/keymaps/media-ch/readme.md rename to keyboards/redox/keymaps/media_ch/readme.md index e43e1403589f..53a080fd5ad5 100644 --- a/keyboards/redox/keymaps/media-ch/readme.md +++ b/keyboards/redox/keymaps/media_ch/readme.md @@ -1,4 +1,4 @@ -# German keymap for Redox +# German keymap for Redox-media A layout for the Redox MEDIA revision. The layout acommodates the German umlauts and the punctuation symbols diff --git a/keyboards/redox/keymaps/media-ch/rules.mk b/keyboards/redox/keymaps/media_ch/rules.mk similarity index 100% rename from keyboards/redox/keymaps/media-ch/rules.mk rename to keyboards/redox/keymaps/media_ch/rules.mk diff --git a/keyboards/redox/media/readme.md b/keyboards/redox/media/readme.md index 3c5acd6c8f87..138d000ed159 100644 --- a/keyboards/redox/media/readme.md +++ b/keyboards/redox/media/readme.md @@ -20,45 +20,34 @@ To try out your pro micro and setup your environment to flash such a device I re Whenever you can't program one of the pro micros or the USB-COM port is not found on your computer, it most probably means that is is not in "bootloader mode". What you want to do is connect the GND and RST pin twice to reset the device and put it into bootloader mode (details [here](https://learn.sparkfun.com/tutorials/pro-micro--fio-v3-hookup-guide/troubleshooting-and-faq#ts-serial)). -To find out how your serial port is called on your computer, you can find it with the following command: -``` -ll /dev | grep "tty\." -``` -Mine is called `/dev/tty.usbmodem14522301` for example. - ### Compiling and flashing Obviously start by [installing QMK](https://docs.qmk.fm/#/getting_started_build_tools?id=set-up-your-environment). - 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 media_CH ``` -The generated files are output to the `.build` directory in the QMK root. You'll want the `.hex` file. +The generated `.hex` file is output to the QMK root. Once you are comfortable flashing your Pro Micros and your setup works continue with the following steps: - I've had the most success with using the `EE_HANDS` setting and flashing the EEPROM to the left and right halves of the keyboard respectively. To do this start with flashing the EEPROM of the 2 pro micros separately by setting the bootloader flag in the flash command (the pro micro uses the avrdude bootloader): ``` -qmk flash -kb redox/media -km media-CH -bl avrdude-split-left -qmk flash -kb redox/media -km media-CH -bl avrdude-split-right +qmk flash -kb redox/media -km media_ch -bl avrdude-split-left +qmk flash -kb redox/media -km media_ch -bl avrdude-split-right ``` Note that you need to reset the pro micro to set it to bootloader mode before you can flash it: connect GND to RST twice in quick succession (750ms), then you have 8 seconds to upload the new eep file. -- For completeness this is the avrdude command with which you could manually do the flashing steps, you might want to use it for debugging. Make sure to set the correct port for flashing (`ll /dev | grep "tty\."`): -``` -avrdude -p atmega32u4 -c avr109 -U flash:w:./.build/redox_media_media.hex:i -P /dev/tty.usbmodem14522301 -``` - ### Adapting the keyboard layout -Copy the `keymaps/media-CH` folder to `keymaps/media-` and adapt the `keymap.c` file in there. +Copy the `keymaps/media_ch` folder to `keymaps/media_` and adapt the `keymap.c` file in there. I recommend testing the key codes with the [QMK tester](https://config.qmk.fm/#/test) and then adapting the `keymap.c` file accordingly. Finally compile your new layout from the QMK root with: ``` -qmk compile -kb redox/media -km media- +qmk compile -kb redox/media -km media_ ``` and proceed to flashing it equivalent to the above instructions. From bdb3d70afa7c158752d418bf60219c7b9eed5dc0 Mon Sep 17 00:00:00 2001 From: shiftux Date: Tue, 3 Aug 2021 16:08:32 +0200 Subject: [PATCH 19/19] Update keyboards/redox/media/readme.md Co-authored-by: Ryan --- keyboards/redox/media/readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/redox/media/readme.md b/keyboards/redox/media/readme.md index 138d000ed159..1391feb90808 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 media_ch ``` The generated `.hex` file is output to the QMK root. @@ -54,4 +54,4 @@ and proceed to flashing it equivalent to the above instructions. ### CAD files and additional resources See [here](https://shiftux.org/making_projects/keyboard.html) for a detailed build description and video. -You can find the CAD and SCAD files, I created here: https://github.com/shiftux/redox-media-keyboard \ No newline at end of file +You can find the CAD and SCAD files, I created here: https://github.com/shiftux/redox-media-keyboard