mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-22 19:39:27 +00:00
Fix backlight support for some boards (#21554)
This commit is contained in:
parent
4137685f8e
commit
39679e055d
@ -15,6 +15,9 @@
|
|||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#define BACKLIGHT_PWM_DRIVER PWMD2
|
||||||
|
#define BACKLIGHT_PWM_CHANNEL 4
|
||||||
|
|
||||||
/* RGB Matrix */
|
/* RGB Matrix */
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
#define RGB_MATRIX_LED_COUNT 30
|
#define RGB_MATRIX_LED_COUNT 30
|
||||||
|
20
keyboards/deng/thirty/halconf.h
Normal file
20
keyboards/deng/thirty/halconf.h
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/* Copyright 2020 Nick Brassel (tzarc)
|
||||||
|
*
|
||||||
|
* 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 3 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define HAL_USE_PWM TRUE
|
||||||
|
|
||||||
|
#include_next <halconf.h>
|
@ -17,7 +17,6 @@
|
|||||||
},
|
},
|
||||||
"diode_direction": "COL2ROW",
|
"diode_direction": "COL2ROW",
|
||||||
"backlight": {
|
"backlight": {
|
||||||
"driver": "software",
|
|
||||||
"pin": "B11",
|
"pin": "B11",
|
||||||
"levels": 5,
|
"levels": 5,
|
||||||
"on_state": 0
|
"on_state": 0
|
||||||
|
21
keyboards/deng/thirty/mcuconf.h
Normal file
21
keyboards/deng/thirty/mcuconf.h
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
/* Copyright 2020 Nick Brassel (tzarc)
|
||||||
|
*
|
||||||
|
* 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 3 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include_next <mcuconf.h>
|
||||||
|
|
||||||
|
#undef STM32_PWM_USE_TIM2
|
||||||
|
#define STM32_PWM_USE_TIM2 TRUE
|
@ -46,3 +46,8 @@ led_config_t g_led_config = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void board_init(void) {
|
||||||
|
// Remap B11 AF to TIM2_CH4
|
||||||
|
AFIO->MAPR |= AFIO_MAPR_TIM2_REMAP_PARTIALREMAP2;
|
||||||
|
}
|
||||||
|
@ -23,7 +23,4 @@
|
|||||||
|
|
||||||
#define HAL_USE_I2C TRUE
|
#define HAL_USE_I2C TRUE
|
||||||
|
|
||||||
#define HAL_USE_PWM TRUE
|
|
||||||
|
|
||||||
#include_next <halconf.h>
|
#include_next <halconf.h>
|
||||||
|
|
||||||
|
@ -19,6 +19,3 @@
|
|||||||
|
|
||||||
#undef STM32_I2C_USE_I2C1
|
#undef STM32_I2C_USE_I2C1
|
||||||
#define STM32_I2C_USE_I2C1 TRUE
|
#define STM32_I2C_USE_I2C1 TRUE
|
||||||
|
|
||||||
#undef STM32_PWM_USE_TIM5
|
|
||||||
#define STM32_PWM_USE_TIM5 TRUE
|
|
@ -23,7 +23,4 @@
|
|||||||
|
|
||||||
#define HAL_USE_I2C TRUE
|
#define HAL_USE_I2C TRUE
|
||||||
|
|
||||||
#define HAL_USE_PWM TRUE
|
|
||||||
|
|
||||||
#include_next <halconf.h>
|
#include_next <halconf.h>
|
||||||
|
|
||||||
|
@ -19,6 +19,3 @@
|
|||||||
|
|
||||||
#undef STM32_I2C_USE_I2C1
|
#undef STM32_I2C_USE_I2C1
|
||||||
#define STM32_I2C_USE_I2C1 TRUE
|
#define STM32_I2C_USE_I2C1 TRUE
|
||||||
|
|
||||||
#undef STM32_PWM_USE_TIM5
|
|
||||||
#define STM32_PWM_USE_TIM5 TRUE
|
|
@ -23,7 +23,4 @@
|
|||||||
|
|
||||||
#define HAL_USE_I2C TRUE
|
#define HAL_USE_I2C TRUE
|
||||||
|
|
||||||
#define HAL_USE_PWM TRUE
|
|
||||||
|
|
||||||
#include_next <halconf.h>
|
#include_next <halconf.h>
|
||||||
|
|
||||||
|
@ -26,9 +26,5 @@
|
|||||||
#undef STM32_I2C_USE_I2C1
|
#undef STM32_I2C_USE_I2C1
|
||||||
#define STM32_I2C_USE_I2C1 TRUE
|
#define STM32_I2C_USE_I2C1 TRUE
|
||||||
|
|
||||||
#undef STM32_PWM_USE_TIM2
|
|
||||||
#define STM32_PWM_USE_TIM2 TRUE
|
|
||||||
|
|
||||||
#undef STM32_SPI_USE_SPI2
|
#undef STM32_SPI_USE_SPI2
|
||||||
#define STM32_SPI_USE_SPI2 FALSE
|
#define STM32_SPI_USE_SPI2 FALSE
|
||||||
|
|
||||||
|
@ -13,11 +13,6 @@
|
|||||||
{"pin_a": "B9", "pin_b": "B8", "resolution": 2}
|
{"pin_a": "B9", "pin_b": "B8", "resolution": 2}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"backlight": {
|
|
||||||
"driver": "software",
|
|
||||||
"pin": "B14",
|
|
||||||
"levels": 5
|
|
||||||
},
|
|
||||||
"debounce": 1,
|
"debounce": 1,
|
||||||
"layouts": {
|
"layouts": {
|
||||||
"LAYOUT": {
|
"LAYOUT": {
|
||||||
|
@ -7,10 +7,9 @@ EXTRAKEY_ENABLE = yes # Audio control and System control
|
|||||||
CONSOLE_ENABLE = yes # Console for debug
|
CONSOLE_ENABLE = yes # Console for debug
|
||||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||||
NKRO_ENABLE = yes # Enable N-Key Rollover
|
NKRO_ENABLE = yes # Enable N-Key Rollover
|
||||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
AUDIO_ENABLE = no # Audio output
|
AUDIO_ENABLE = no # Audio output
|
||||||
SLEEP_LED_ENABLE = yes
|
|
||||||
OLED_ENABLE = yes
|
OLED_ENABLE = yes
|
||||||
OLED_DRIVER = SSD1306
|
OLED_DRIVER = SSD1306
|
||||||
ENCODER_ENABLE = yes
|
ENCODER_ENABLE = yes
|
||||||
|
@ -16,4 +16,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#define BACKLIGHT_PWM_DRIVER PWMD5
|
||||||
|
#define BACKLIGHT_PWM_CHANNEL 1
|
||||||
|
|
||||||
#define MOUSEKEY_INTERVAL 32
|
#define MOUSEKEY_INTERVAL 32
|
||||||
|
@ -23,5 +23,6 @@
|
|||||||
|
|
||||||
#define SERIAL_USB_BUFFERS_SIZE 256
|
#define SERIAL_USB_BUFFERS_SIZE 256
|
||||||
|
|
||||||
#include_next <halconf.h>
|
#define HAL_USE_PWM TRUE
|
||||||
|
|
||||||
|
#include_next <halconf.h>
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
},
|
},
|
||||||
"diode_direction": "COL2ROW",
|
"diode_direction": "COL2ROW",
|
||||||
"backlight": {
|
"backlight": {
|
||||||
"driver": "software",
|
|
||||||
"pin": "A0",
|
"pin": "A0",
|
||||||
"levels": 5
|
"levels": 5
|
||||||
},
|
},
|
||||||
|
6
keyboards/handwired/riblee_f401/mcuconf.h
Normal file
6
keyboards/handwired/riblee_f401/mcuconf.h
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include_next <mcuconf.h>
|
||||||
|
|
||||||
|
#undef STM32_PWM_USE_TIM5
|
||||||
|
#define STM32_PWM_USE_TIM5 TRUE
|
Loading…
Reference in New Issue
Block a user