diff options
author | InigoGutierrez <inigogf.95@gmail.com> | 2022-06-27 16:38:28 +0200 |
---|---|---|
committer | InigoGutierrez <inigogf.95@gmail.com> | 2022-06-27 16:38:28 +0200 |
commit | 98b9909429aea0869f7a6f2f44ab386a4a3ff094 (patch) | |
tree | e1080a61bb89a75edc70818489f8044adf597c48 /keyboards/durgod | |
parent | b610965fd6d851484025166fb255078b1c809261 (diff) | |
parent | fa3dd373b4925734d9843ae6014349069ffec353 (diff) | |
download | qmk_firmware-98b9909429aea0869f7a6f2f44ab386a4a3ff094.tar.gz qmk_firmware-98b9909429aea0869f7a6f2f44ab386a4a3ff094.zip |
Merge branch 'master' into taamas
Diffstat (limited to 'keyboards/durgod')
-rw-r--r-- | keyboards/durgod/boards/DURGOD_STM32_F070/bootloader_defs.h | 7 | ||||
-rw-r--r-- | keyboards/durgod/boards/DURGOD_STM32_F070/chconf.h | 2 | ||||
-rw-r--r-- | keyboards/durgod/boards/DURGOD_STM32_F070/mcuconf.h | 2 | ||||
-rw-r--r-- | keyboards/durgod/dgk6x/config.h | 53 | ||||
-rw-r--r-- | keyboards/durgod/dgk6x/galaxy/galaxy.c | 2 | ||||
-rw-r--r-- | keyboards/durgod/dgk6x/hades/hades.c | 2 | ||||
-rw-r--r-- | keyboards/durgod/dgk6x/halconf.h | 3 | ||||
-rw-r--r-- | keyboards/durgod/dgk6x/rules.mk | 11 | ||||
-rw-r--r-- | keyboards/durgod/dgk6x/venus/venus.c | 2 | ||||
-rw-r--r-- | keyboards/durgod/k3x0/config.h | 3 | ||||
-rw-r--r-- | keyboards/durgod/k3x0/halconf.h | 2 | ||||
-rw-r--r-- | keyboards/durgod/k3x0/readme.md | 70 | ||||
-rw-r--r-- | keyboards/durgod/k3x0/rules.mk | 7 |
13 files changed, 118 insertions, 48 deletions
diff --git a/keyboards/durgod/boards/DURGOD_STM32_F070/bootloader_defs.h b/keyboards/durgod/boards/DURGOD_STM32_F070/bootloader_defs.h deleted file mode 100644 index 02c48c4e6d..0000000000 --- a/keyboards/durgod/boards/DURGOD_STM32_F070/bootloader_defs.h +++ /dev/null @@ -1,7 +0,0 @@ -/* Address for jumping to bootloader on STM32 chips. */ -/* It is chip dependent, the correct number can be looked up here (page 175): - * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf - * This also requires a patch to chibios: - * <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch - */ -#define STM32_BOOTLOADER_ADDRESS 0x1FFFC800 diff --git a/keyboards/durgod/boards/DURGOD_STM32_F070/chconf.h b/keyboards/durgod/boards/DURGOD_STM32_F070/chconf.h index a7d95c51a9..d70f188178 100644 --- a/keyboards/durgod/boards/DURGOD_STM32_F070/chconf.h +++ b/keyboards/durgod/boards/DURGOD_STM32_F070/chconf.h @@ -21,7 +21,7 @@ #pragma once -#define CH_CFG_ST_FREQUENCY 10000 +#define CH_CFG_ST_FREQUENCY 1000 #define CH_CFG_ST_TIMEDELTA 0 diff --git a/keyboards/durgod/boards/DURGOD_STM32_F070/mcuconf.h b/keyboards/durgod/boards/DURGOD_STM32_F070/mcuconf.h index 6d67aa96aa..a24c1cee12 100644 --- a/keyboards/durgod/boards/DURGOD_STM32_F070/mcuconf.h +++ b/keyboards/durgod/boards/DURGOD_STM32_F070/mcuconf.h @@ -85,7 +85,7 @@ */ #define STM32_GPT_USE_TIM1 FALSE #define STM32_GPT_USE_TIM2 FALSE -#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM3 TRUE #define STM32_GPT_USE_TIM14 FALSE #define STM32_GPT_TIM1_IRQ_PRIORITY 2 #define STM32_GPT_TIM2_IRQ_PRIORITY 2 diff --git a/keyboards/durgod/dgk6x/config.h b/keyboards/durgod/dgk6x/config.h index 53f824b98e..28a506cf8d 100644 --- a/keyboards/durgod/dgk6x/config.h +++ b/keyboards/durgod/dgk6x/config.h @@ -22,6 +22,8 @@ #define VENDOR_ID 0xD60D #define MANUFACTURER Hoksi Technology +#define WAIT_US_TIMER GPTD3 + /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL @@ -83,9 +85,54 @@ # define RGB_MATRIX_LED_PROCESS_LIMIT 4 # define RGB_MATRIX_LED_FLUSH_LIMIT 26 -# define DISABLE_RGB_MATRIX_HUE_BREATHING -# define DISABLE_RGB_MATRIX_HUE_PENDULUM -# define DISABLE_RGB_MATRIX_HUE_WAVE +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// # define ENABLE_RGB_MATRIX_HUE_BREATHING +// # define ENABLE_RGB_MATRIX_HUE_PENDULUM +// # define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // This allows VIA to control RGB Matrix settings in the 'Lighting' section. #define VIA_QMK_RGBLIGHT_ENABLE diff --git a/keyboards/durgod/dgk6x/galaxy/galaxy.c b/keyboards/durgod/dgk6x/galaxy/galaxy.c index 5f793ed85b..86aef1bced 100644 --- a/keyboards/durgod/dgk6x/galaxy/galaxy.c +++ b/keyboards/durgod/dgk6x/galaxy/galaxy.c @@ -18,7 +18,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/durgod/dgk6x/hades/hades.c b/keyboards/durgod/dgk6x/hades/hades.c index 3e235683f1..2f2f9e650f 100644 --- a/keyboards/durgod/dgk6x/hades/hades.c +++ b/keyboards/durgod/dgk6x/hades/hades.c @@ -19,7 +19,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/durgod/dgk6x/halconf.h b/keyboards/durgod/dgk6x/halconf.h index 1772f8e410..9c1c6e5280 100644 --- a/keyboards/durgod/dgk6x/halconf.h +++ b/keyboards/durgod/dgk6x/halconf.h @@ -19,4 +19,7 @@ #ifdef RGB_MATRIX_ENABLE #define HAL_USE_I2C TRUE #endif + +#define HAL_USE_GPT TRUE + #include_next <halconf.h> diff --git a/keyboards/durgod/dgk6x/rules.mk b/keyboards/durgod/dgk6x/rules.mk index 56097ed660..660719104d 100644 --- a/keyboards/durgod/dgk6x/rules.mk +++ b/keyboards/durgod/dgk6x/rules.mk @@ -1,24 +1,23 @@ # MCU name # Actually F070, but close enough MCU = STM32F072 - BOARD = DURGOD_STM32_F070 +# Bootloader selection +BOOTLOADER = stm32-dfu + # Do not put the microcontroller into power saving mode NO_SUSPEND_POWER_DOWN = yes # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # 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 +NKRO_ENABLE = yes # Enable N-Key Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output diff --git a/keyboards/durgod/dgk6x/venus/venus.c b/keyboards/durgod/dgk6x/venus/venus.c index 3398acb19d..0b7fbd12f3 100644 --- a/keyboards/durgod/dgk6x/venus/venus.c +++ b/keyboards/durgod/dgk6x/venus/venus.c @@ -18,7 +18,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/durgod/k3x0/config.h b/keyboards/durgod/k3x0/config.h index ef73a71016..691076ecac 100644 --- a/keyboards/durgod/k3x0/config.h +++ b/keyboards/durgod/k3x0/config.h @@ -23,6 +23,8 @@ #define VENDOR_ID 0xD60D #define MANUFACTURER Hoksi Technology +#define WAIT_US_TIMER GPTD3 + /* key matrix size (rows in specific keyboard variant) */ #define MATRIX_COLS 16 @@ -38,7 +40,6 @@ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 -// #define USB_POLLING_INTERVAL_MS 1 /* Bootmagic Lite key configuration */ #define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE diff --git a/keyboards/durgod/k3x0/halconf.h b/keyboards/durgod/k3x0/halconf.h index fa20fe30a9..d2a9d8c7c0 100644 --- a/keyboards/durgod/k3x0/halconf.h +++ b/keyboards/durgod/k3x0/halconf.h @@ -19,4 +19,6 @@ #define HAL_USE_PAL TRUE #define PAL_USE_CALLBACKS TRUE +#define HAL_USE_GPT TRUE + #include_next <halconf.h> diff --git a/keyboards/durgod/k3x0/readme.md b/keyboards/durgod/k3x0/readme.md index cbb170160c..62bb97d7ec 100644 --- a/keyboards/durgod/k3x0/readme.md +++ b/keyboards/durgod/k3x0/readme.md @@ -18,34 +18,62 @@ Instructions for building the K310 and K320 firmware can be found here: ### Initial Flash -For first Flashing from initial Stock Firmware +#### Requirements -1. Back up original Firmware Image: -- Unplug -- Short Boot0 to Vdd (See below) -- Plug In USB -- Make a Flash Image's Backup in case you wanted to restore the Keyboard to Stock's Image: - - Using dfu-util: +- The Durgod K320/K310 - different batches have different controllers, so when opening the keyboard, you will have to make sure it's using SMT32 controller. +- Another keyboard - when on bootloader mode, you can't use the keyboard to type and execute the commands (not really required if you can use any mouse interface to type and execute the commands). +- 2 prying tools - to open the keyboard. +- Another helping hand - it can be also done with just two hands, but it will require a lot of dexterity. +- A small cable with both ends cut. - dfu-util --list - dfu-util --alt 0 --dfuse-address 0x08000000 --upload ${OLD_STOCK_BIN} +#### Enter bootloader while using the original firmware -2. Flash the QMK Firmware Image. -- Put board into Bootloader mode, using the same method as when backing up the original Firmware (above) -- Here are a few options for performing the initial Flash: - - Using [QMK Toolbox](https://github.com/qmk/qmk_toolbox) +1. Unplug USB cable. +2. Open the keyboard case - there are plenty of youtube videos in that, but you will basically need 2 prying tools and a certain amount of force. +3. After opening the keyboard, put the PCB upsides down, and the controller should be near the LEDs, and make sure it's using the right controller (SMT32). +4. Use the cable to short Boot0 to Vdd, by shorting R21 to C27 on the sides closest to the processor, as shown: + +<img src="https://i.imgur.com/hvDnw5a.jpg" width="520" height="693" alt="Shorting Boot0 to Vdd on K320"> + +5. While shorting both contacts as instructed in step 4, plug in the USB cable. +6. When the USB cable is fully inserted, the LEDs should not turn on and the keyboard it's not able to type, you are probably on bootloader mode, to be sure: + - Using dfu-util, it should show something like "Found DFU…" after using this command: +``` +dfu-util --list +``` + +Now that you are sure to be in bootloader mode, you can backup the original firmware and flash QMK Firmware. + +If it does not behave like described, remove the cable and go back to step 4. + +#### Backup original firmware + +1. Be in Bootloader mode. +2. Execute this command to backup: - Using dfu-util: +```bash +dfu-util -a 0 -d 0483:DF11 -s 0x08000000 -U k3x0_original.bin +``` + +#### Flash the QMK Firmware Image - dfu-util --alt 0 --dfuse-address 0x08000000 --download ${NEW_QMK_BIN} +1. Be in Bootloader mode. +2. Here are a few options for performing the initial Flash: + - Using [QMK Toolbox](https://github.com/qmk/qmk_toolbox) + - Using qmk on command line: -You can short Boot0 to Vdd by shorting R21 to C27 on the sides closest to the processor, as shown: +```bash +# k310 +qmk flash -kb durgod/k3x0/k310 -km default -<img src="https://i.imgur.com/hvDnw5a.jpg" width="520" height="693" alt="Shorting Boot0 to Vdd on K320"> +# k320 +qmk flash -kb durgod/k3x0/k320 -km default +``` ### Subsequent Flashing -For repeating Flashing you can use BootMagic: -- BootMagic Lite has been enabled with Assigned "Esc" key -- Unplug USB Cable -- Holding Esc Button -- Plug in USB Cable, Keyboard should be in ST-Bootloader state +For repeating Flashing you can use BootMagic Lite has been enabled by default and assigned to the "Esc" key: + +1. Unplug USB Cable. +2. Hold the "Esc" key. +2. Plug in the USB Cable, the Keyboard should be in ST-Bootloader state. diff --git a/keyboards/durgod/k3x0/rules.mk b/keyboards/durgod/k3x0/rules.mk index 827f223653..bccaec46b3 100644 --- a/keyboards/durgod/k3x0/rules.mk +++ b/keyboards/durgod/k3x0/rules.mk @@ -12,15 +12,12 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # 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 +NKRO_ENABLE = yes # Enable N-Key Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output |