summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-07-21 09:41:02 +1000
committerGitHub <noreply@github.com>2023-07-21 09:41:02 +1000
commit39679e055d803fcd0fda3669088df694e0e31b2c (patch)
treee4c06867348da1db27a04b9d7a34dd2ba8db3a30
parent4137685f8eb3ecde7ba0158a78cd9c411ee05606 (diff)
Fix backlight support for some boards (#21554)
-rw-r--r--keyboards/deng/thirty/config.h3
-rw-r--r--keyboards/deng/thirty/halconf.h20
-rw-r--r--keyboards/deng/thirty/info.json1
-rw-r--r--keyboards/deng/thirty/mcuconf.h21
-rw-r--r--keyboards/deng/thirty/thirty.c5
-rw-r--r--keyboards/handwired/pill60/blackpill_f401/halconf.h3
-rw-r--r--keyboards/handwired/pill60/blackpill_f401/mcuconf.h3
-rw-r--r--keyboards/handwired/pill60/blackpill_f411/halconf.h3
-rw-r--r--keyboards/handwired/pill60/blackpill_f411/mcuconf.h3
-rw-r--r--keyboards/handwired/pill60/bluepill/halconf.h3
-rw-r--r--keyboards/handwired/pill60/bluepill/mcuconf.h4
-rw-r--r--keyboards/handwired/pill60/info.json5
-rw-r--r--keyboards/handwired/pill60/rules.mk3
-rw-r--r--keyboards/handwired/riblee_f401/config.h3
-rw-r--r--keyboards/handwired/riblee_f401/halconf.h3
-rw-r--r--keyboards/handwired/riblee_f401/info.json1
-rw-r--r--keyboards/handwired/riblee_f401/mcuconf.h6
17 files changed, 61 insertions, 29 deletions
diff --git a/keyboards/deng/thirty/config.h b/keyboards/deng/thirty/config.h
index d80983202f..20e6673dd2 100644
--- a/keyboards/deng/thirty/config.h
+++ b/keyboards/deng/thirty/config.h
@@ -15,6 +15,9 @@
15 */ 15 */
16#pragma once 16#pragma once
17 17
18#define BACKLIGHT_PWM_DRIVER PWMD2
19#define BACKLIGHT_PWM_CHANNEL 4
20
18/* RGB Matrix */ 21/* RGB Matrix */
19#ifdef RGB_MATRIX_ENABLE 22#ifdef RGB_MATRIX_ENABLE
20#define RGB_MATRIX_LED_COUNT 30 23#define RGB_MATRIX_LED_COUNT 30
diff --git a/keyboards/deng/thirty/halconf.h b/keyboards/deng/thirty/halconf.h
new file mode 100644
index 0000000000..b107a87e75
--- /dev/null
+++ b/keyboards/deng/thirty/halconf.h
@@ -0,0 +1,20 @@
1/* Copyright 2020 Nick Brassel (tzarc)
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <https://www.gnu.org/licenses/>.
15 */
16#pragma once
17
18#define HAL_USE_PWM TRUE
19
20#include_next <halconf.h>
diff --git a/keyboards/deng/thirty/info.json b/keyboards/deng/thirty/info.json
index 1d9b018e6b..59f3616215 100644
--- a/keyboards/deng/thirty/info.json
+++ b/keyboards/deng/thirty/info.json
@@ -17,7 +17,6 @@
17 }, 17 },
18 "diode_direction": "COL2ROW", 18 "diode_direction": "COL2ROW",
19 "backlight": { 19 "backlight": {
20 "driver": "software",
21 "pin": "B11", 20 "pin": "B11",
22 "levels": 5, 21 "levels": 5,
23 "on_state": 0 22 "on_state": 0
diff --git a/keyboards/deng/thirty/mcuconf.h b/keyboards/deng/thirty/mcuconf.h
new file mode 100644
index 0000000000..8ff617051f
--- /dev/null
+++ b/keyboards/deng/thirty/mcuconf.h
@@ -0,0 +1,21 @@
1/* Copyright 2020 Nick Brassel (tzarc)
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 3 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <https://www.gnu.org/licenses/>.
15 */
16#pragma once
17
18#include_next <mcuconf.h>
19
20#undef STM32_PWM_USE_TIM2
21#define STM32_PWM_USE_TIM2 TRUE
diff --git a/keyboards/deng/thirty/thirty.c b/keyboards/deng/thirty/thirty.c
index 2e582d6833..7d49bc1b03 100644
--- a/keyboards/deng/thirty/thirty.c
+++ b/keyboards/deng/thirty/thirty.c
@@ -46,3 +46,8 @@ led_config_t g_led_config = {
46}; 46};
47 47
48#endif 48#endif
49
50void board_init(void) {
51 // Remap B11 AF to TIM2_CH4
52 AFIO->MAPR |= AFIO_MAPR_TIM2_REMAP_PARTIALREMAP2;
53}
diff --git a/keyboards/handwired/pill60/blackpill_f401/halconf.h b/keyboards/handwired/pill60/blackpill_f401/halconf.h
index 1e126a8656..b2ef07f1c9 100644
--- a/keyboards/handwired/pill60/blackpill_f401/halconf.h
+++ b/keyboards/handwired/pill60/blackpill_f401/halconf.h
@@ -23,7 +23,4 @@
23 23
24#define HAL_USE_I2C TRUE 24#define HAL_USE_I2C TRUE
25 25
26#define HAL_USE_PWM TRUE
27
28#include_next <halconf.h> 26#include_next <halconf.h>
29
diff --git a/keyboards/handwired/pill60/blackpill_f401/mcuconf.h b/keyboards/handwired/pill60/blackpill_f401/mcuconf.h
index ab89514fb1..563b86d26d 100644
--- a/keyboards/handwired/pill60/blackpill_f401/mcuconf.h
+++ b/keyboards/handwired/pill60/blackpill_f401/mcuconf.h
@@ -19,6 +19,3 @@
19 19
20#undef STM32_I2C_USE_I2C1 20#undef STM32_I2C_USE_I2C1
21#define STM32_I2C_USE_I2C1 TRUE 21#define STM32_I2C_USE_I2C1 TRUE
22
23#undef STM32_PWM_USE_TIM5
24#define STM32_PWM_USE_TIM5 TRUE \ No newline at end of file
diff --git a/keyboards/handwired/pill60/blackpill_f411/halconf.h b/keyboards/handwired/pill60/blackpill_f411/halconf.h
index 435bf3274e..f563693fac 100644
--- a/keyboards/handwired/pill60/blackpill_f411/halconf.h
+++ b/keyboards/handwired/pill60/blackpill_f411/halconf.h
@@ -23,7 +23,4 @@
23 23
24#define HAL_USE_I2C TRUE 24#define HAL_USE_I2C TRUE
25 25
26#define HAL_USE_PWM TRUE
27
28#include_next <halconf.h> 26#include_next <halconf.h>
29
diff --git a/keyboards/handwired/pill60/blackpill_f411/mcuconf.h b/keyboards/handwired/pill60/blackpill_f411/mcuconf.h
index ab89514fb1..563b86d26d 100644
--- a/keyboards/handwired/pill60/blackpill_f411/mcuconf.h
+++ b/keyboards/handwired/pill60/blackpill_f411/mcuconf.h
@@ -19,6 +19,3 @@
19 19
20#undef STM32_I2C_USE_I2C1 20#undef STM32_I2C_USE_I2C1
21#define STM32_I2C_USE_I2C1 TRUE 21#define STM32_I2C_USE_I2C1 TRUE
22
23#undef STM32_PWM_USE_TIM5
24#define STM32_PWM_USE_TIM5 TRUE \ No newline at end of file
diff --git a/keyboards/handwired/pill60/bluepill/halconf.h b/keyboards/handwired/pill60/bluepill/halconf.h
index 459ec86e2d..d423df1512 100644
--- a/keyboards/handwired/pill60/bluepill/halconf.h
+++ b/keyboards/handwired/pill60/bluepill/halconf.h
@@ -23,7 +23,4 @@
23 23
24#define HAL_USE_I2C TRUE 24#define HAL_USE_I2C TRUE
25 25
26#define HAL_USE_PWM TRUE
27
28#include_next <halconf.h> 26#include_next <halconf.h>
29
diff --git a/keyboards/handwired/pill60/bluepill/mcuconf.h b/keyboards/handwired/pill60/bluepill/mcuconf.h
index 22f8b02704..f335353541 100644
--- a/keyboards/handwired/pill60/bluepill/mcuconf.h
+++ b/keyboards/handwired/pill60/bluepill/mcuconf.h
@@ -26,9 +26,5 @@
26#undef STM32_I2C_USE_I2C1 26#undef STM32_I2C_USE_I2C1
27#define STM32_I2C_USE_I2C1 TRUE 27#define STM32_I2C_USE_I2C1 TRUE
28 28
29#undef STM32_PWM_USE_TIM2
30#define STM32_PWM_USE_TIM2 TRUE
31
32#undef STM32_SPI_USE_SPI2 29#undef STM32_SPI_USE_SPI2
33#define STM32_SPI_USE_SPI2 FALSE 30#define STM32_SPI_USE_SPI2 FALSE
34
diff --git a/keyboards/handwired/pill60/info.json b/keyboards/handwired/pill60/info.json
index 6cc337f8ee..ac8c9013ba 100644
--- a/keyboards/handwired/pill60/info.json
+++ b/keyboards/handwired/pill60/info.json
@@ -13,11 +13,6 @@
13 {"pin_a": "B9", "pin_b": "B8", "resolution": 2} 13 {"pin_a": "B9", "pin_b": "B8", "resolution": 2}
14 ] 14 ]
15 }, 15 },
16 "backlight": {
17 "driver": "software",
18 "pin": "B14",
19 "levels": 5
20 },
21 "debounce": 1, 16 "debounce": 1,
22 "layouts": { 17 "layouts": {
23 "LAYOUT": { 18 "LAYOUT": {
diff --git a/keyboards/handwired/pill60/rules.mk b/keyboards/handwired/pill60/rules.mk
index f8bae6b6df..f7d65c56c2 100644
--- a/keyboards/handwired/pill60/rules.mk
+++ b/keyboards/handwired/pill60/rules.mk
@@ -7,10 +7,9 @@ EXTRAKEY_ENABLE = yes # Audio control and System control
7CONSOLE_ENABLE = yes # Console for debug 7CONSOLE_ENABLE = yes # Console for debug
8COMMAND_ENABLE = yes # Commands for debug and configuration 8COMMAND_ENABLE = yes # Commands for debug and configuration
9NKRO_ENABLE = yes # Enable N-Key Rollover 9NKRO_ENABLE = yes # Enable N-Key Rollover
10BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality 10BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
11RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow 11RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
12AUDIO_ENABLE = no # Audio output 12AUDIO_ENABLE = no # Audio output
13SLEEP_LED_ENABLE = yes
14OLED_ENABLE = yes 13OLED_ENABLE = yes
15OLED_DRIVER = SSD1306 14OLED_DRIVER = SSD1306
16ENCODER_ENABLE = yes 15ENCODER_ENABLE = yes
diff --git a/keyboards/handwired/riblee_f401/config.h b/keyboards/handwired/riblee_f401/config.h
index c39cbc87f5..3e384e5b5b 100644
--- a/keyboards/handwired/riblee_f401/config.h
+++ b/keyboards/handwired/riblee_f401/config.h
@@ -16,4 +16,7 @@
16 16
17#pragma once 17#pragma once
18 18
19#define BACKLIGHT_PWM_DRIVER PWMD5
20#define BACKLIGHT_PWM_CHANNEL 1
21
19#define MOUSEKEY_INTERVAL 32 22#define MOUSEKEY_INTERVAL 32
diff --git a/keyboards/handwired/riblee_f401/halconf.h b/keyboards/handwired/riblee_f401/halconf.h
index 3c20471df1..b537d56c26 100644
--- a/keyboards/handwired/riblee_f401/halconf.h
+++ b/keyboards/handwired/riblee_f401/halconf.h
@@ -23,5 +23,6 @@
23 23
24#define SERIAL_USB_BUFFERS_SIZE 256 24#define SERIAL_USB_BUFFERS_SIZE 256
25 25
26#include_next <halconf.h> 26#define HAL_USE_PWM TRUE
27 27
28#include_next <halconf.h>
diff --git a/keyboards/handwired/riblee_f401/info.json b/keyboards/handwired/riblee_f401/info.json
index 4ff8ec21f6..933973d5f3 100644
--- a/keyboards/handwired/riblee_f401/info.json
+++ b/keyboards/handwired/riblee_f401/info.json
@@ -17,7 +17,6 @@
17 }, 17 },
18 "diode_direction": "COL2ROW", 18 "diode_direction": "COL2ROW",
19 "backlight": { 19 "backlight": {
20 "driver": "software",
21 "pin": "A0", 20 "pin": "A0",
22 "levels": 5 21 "levels": 5
23 }, 22 },
diff --git a/keyboards/handwired/riblee_f401/mcuconf.h b/keyboards/handwired/riblee_f401/mcuconf.h
new file mode 100644
index 0000000000..674f5e362f
--- /dev/null
+++ b/keyboards/handwired/riblee_f401/mcuconf.h
@@ -0,0 +1,6 @@
1#pragma once
2
3#include_next <mcuconf.h>
4
5#undef STM32_PWM_USE_TIM5
6#define STM32_PWM_USE_TIM5 TRUE