From 28e92536d46298229593c12406b503bf3bcbbede Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20A=2E=20Volpato?= Date: Tue, 7 Dec 2021 11:48:12 -0300 Subject: [PATCH] Iron180 LED fix (#15411) --- keyboards/iron180/config.h | 27 +++------------------- keyboards/iron180/halconf.h | 10 ++------ keyboards/iron180/iron180.h | 2 +- keyboards/iron180/keymaps/default/keymap.c | 2 +- keyboards/iron180/keymaps/via/keymap.c | 2 +- keyboards/iron180/mcuconf.h | 10 +------- keyboards/iron180/readme.md | 25 ++++++++++++++++---- keyboards/iron180/rules.mk | 3 ++- 8 files changed, 31 insertions(+), 50 deletions(-) diff --git a/keyboards/iron180/config.h b/keyboards/iron180/config.h index b7b6cb6520c..bb71496b530 100644 --- a/keyboards/iron180/config.h +++ b/keyboards/iron180/config.h @@ -1,5 +1,5 @@ /* -Copyright 2015 Álvaro "Gondolindrim" Volpato +Copyright 2021 Álvaro "Gondolindrim" Volpato 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 @@ -36,12 +36,9 @@ along with this program. If not, see . #define BACKLIGHT_PWM_DRIVER PWMD3 #define BACKLIGHT_PWM_CHANNEL 1 #define BACKLIGHT_PAL_MODE 1 -#define BACKLIGHT_LEVELS 6 +#define BACKLIGHT_LEVELS 20 #define BACKLIGHT_BREATHING -#define BREATHING_PERIOD 6 - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST +#define BREATHING_PERIOD 5 /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 @@ -50,21 +47,3 @@ along with this program. If not, see . #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION diff --git a/keyboards/iron180/halconf.h b/keyboards/iron180/halconf.h index 2d084142635..dbc739b1348 100644 --- a/keyboards/iron180/halconf.h +++ b/keyboards/iron180/halconf.h @@ -1,4 +1,4 @@ -/* Copyright 2020 QMK +/* Copyright 2021 QMK * * 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 @@ -14,14 +14,8 @@ * along with this program. If not, see . */ -/* - * This file was auto-generated by: - * `qmk chibios-confmigrate -i keyboards/iron180/halconf.h -r platforms/chibios/common/configs/halconf.h` - */ - #pragma once -#define HAL_USE_PWM YES +#define HAL_USE_PWM TRUE #include_next - diff --git a/keyboards/iron180/iron180.h b/keyboards/iron180/iron180.h index 032d8afb58e..3027ed11ac9 100644 --- a/keyboards/iron180/iron180.h +++ b/keyboards/iron180/iron180.h @@ -1,5 +1,5 @@ /* -Copyright 2015 Álvaro "Gondolindrim" Volpato +Copyright 2021 Álvaro "Gondolindrim" Volpato 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 diff --git a/keyboards/iron180/keymaps/default/keymap.c b/keyboards/iron180/keymaps/default/keymap.c index d78f60e1189..46b1072228f 100755 --- a/keyboards/iron180/keymaps/default/keymap.c +++ b/keyboards/iron180/keymaps/default/keymap.c @@ -27,7 +27,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LWIN, KC_LALT, KC_SPC , KC_RALT, KC_RWIN, MO(1) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), [1] = LAYOUT_all( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/iron180/keymaps/via/keymap.c b/keyboards/iron180/keymaps/via/keymap.c index d78f60e1189..46b1072228f 100755 --- a/keyboards/iron180/keymaps/via/keymap.c +++ b/keyboards/iron180/keymaps/via/keymap.c @@ -27,7 +27,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LWIN, KC_LALT, KC_SPC , KC_RALT, KC_RWIN, MO(1) , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), [1] = LAYOUT_all( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RESET , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/iron180/mcuconf.h b/keyboards/iron180/mcuconf.h index 620b983c75b..a81f8122071 100644 --- a/keyboards/iron180/mcuconf.h +++ b/keyboards/iron180/mcuconf.h @@ -14,17 +14,9 @@ * along with this program. If not, see . */ -/* - * This file was auto-generated by: - * `qmk chibios-confmigrate -i keyboards/iron180/mcuconf.h -r platforms/chibios/GENERIC_STM32_F072XB/configs/mcuconf.h` - */ - #pragma once #include_next -#undef STM32_I2C_USE_DMA -#define STM32_I2C_USE_DMA FALSE - #undef STM32_PWM_USE_TIM3 -#define STM32_PWM_USE_TIM3 YES +#define STM32_PWM_USE_TIM3 TRUE diff --git a/keyboards/iron180/readme.md b/keyboards/iron180/readme.md index 5f340c4251d..1dbffae1d4e 100644 --- a/keyboards/iron180/readme.md +++ b/keyboards/iron180/readme.md @@ -1,4 +1,6 @@ -# Iron180 QMK folder +# Iron180 QMK firmware folder + +![iron180](https://i.imgur.com/zHcZoxa.png) ## Introduction @@ -6,13 +8,26 @@ This is the QMK Firmware repository for the Iron180 PCB, a keyboard designed by The Iron180 PCB is a F13 TKL PCB with ALPS switches support. It also supports in-switch single-color LEDs and a multi-layout design for default or 7U bottom row, ISO layout, split backspace and right shift. -As of November 2020, the only way to obtain an Iron180 was through the [Group Buy](https://geekhack.org/index.php?topic=109513) which is already over and all spots were filled. +As of november 2021, the Group Buy of Iron180 is already over and extras were not sold yet. See the [GB page](https://geekhack.org/index.php?topic=109513) for more information. -## How to compile +## How to flash -After setting up your build environment, you can compile the Iron180 default keymap by using: +### Enter bootloader + +The DFU state in the bootloader can be accessed in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard with the key pressed; +* **Physical reset button**: press the button on the front of the PCB, next to caps lock, for at least five seconds; +* **Keycode in layout**: Press the key mapped to `RESET` if it is available (ESCAPE key in layer 1 of the default layout); + +## Compile firmware and flash + +To build the default layout for this keyboard (after setting up your build environment), use: make iron180: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). +Then, after accessing the DFU state, use a tool like `dfu-util` or the QMK Toolbox to download that firmware into your PCB. To directly compile-and-flash the PCB after it is put into a DFU state, use + make iron180:default:flash + +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/iron180/rules.mk b/keyboards/iron180/rules.mk index bb9e5edc372..83576bbed75 100644 --- a/keyboards/iron180/rules.mk +++ b/keyboards/iron180/rules.mk @@ -14,7 +14,8 @@ CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # 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 +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BACKLIGHT_DRIVER = pwm RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output ENCODER_ENABLE = no