summaryrefslogtreecommitdiff
path: root/keyboards/handwired
diff options
context:
space:
mode:
authorHorrorTroll <sonicvipduc@gmail.com>2025-05-11 01:26:50 +0700
committerGitHub <noreply@github.com>2025-05-10 19:26:50 +0100
commit02525f683e7ad1a2f032dfe8663b0303d1714a7d (patch)
tree0e4fd2b9ccb17fee788c1abb7080667bd461f661 /keyboards/handwired
parent5a57d2115b96d682534de22518e8d6bdf8ce6ab7 (diff)
Allow LVGL onekey keymap to be able compile for other board (#25005)
Diffstat (limited to 'keyboards/handwired')
-rw-r--r--keyboards/handwired/onekey/at_start_f415/config.h14
-rw-r--r--keyboards/handwired/onekey/at_start_f415/halconf.h3
-rw-r--r--keyboards/handwired/onekey/at_start_f415/keyboard.json2
-rw-r--r--keyboards/handwired/onekey/at_start_f415/mcuconf.h3
-rw-r--r--keyboards/handwired/onekey/kb2040/config.h10
-rw-r--r--keyboards/handwired/onekey/kb2040/halconf.h22
-rw-r--r--keyboards/handwired/onekey/kb2040/mcuconf.h3
-rw-r--r--keyboards/handwired/onekey/keymaps/lvgl/config.h15
-rw-r--r--keyboards/handwired/onekey/keymaps/lvgl/halconf.h12
-rw-r--r--keyboards/handwired/onekey/keymaps/lvgl/mcuconf.h9
-rw-r--r--keyboards/handwired/onekey/rp2040/config.h11
-rw-r--r--keyboards/handwired/onekey/rp2040/halconf.h5
-rw-r--r--keyboards/handwired/onekey/rp2040/mcuconf.h3
13 files changed, 75 insertions, 37 deletions
diff --git a/keyboards/handwired/onekey/at_start_f415/config.h b/keyboards/handwired/onekey/at_start_f415/config.h
index 41aece900c..7e41e7da89 100644
--- a/keyboards/handwired/onekey/at_start_f415/config.h
+++ b/keyboards/handwired/onekey/at_start_f415/config.h
@@ -4,11 +4,25 @@
4 4
5#pragma once 5#pragma once
6 6
7/* ADC pin */
7#define ADC_PIN A0 8#define ADC_PIN A0
8 9
10/* Backlight configs */
9#define BACKLIGHT_PWM_DRIVER PWMD5 11#define BACKLIGHT_PWM_DRIVER PWMD5
10#define BACKLIGHT_PWM_CHANNEL 1 12#define BACKLIGHT_PWM_CHANNEL 1
11 13
14/* LCD configs */
15#define LCD_RST_PIN A2
16#define LCD_DC_PIN A3
17#define LCD_CS_PIN A4
18
19/* SPI pins */
20#define SPI_DRIVER SPID1
21#define SPI_SCK_PIN A5
22#define SPI_MOSI_PIN A7
23#define SPI_MISO_PIN A6
24
25/* Haptic configs */
12#define SOLENOID_PIN B12 26#define SOLENOID_PIN B12
13#define SOLENOID_PINS { B12, B13, B14, B15 } 27#define SOLENOID_PINS { B12, B13, B14, B15 }
14#define SOLENOID_PINS_ACTIVE_STATE { high, high, low } 28#define SOLENOID_PINS_ACTIVE_STATE { high, high, low }
diff --git a/keyboards/handwired/onekey/at_start_f415/halconf.h b/keyboards/handwired/onekey/at_start_f415/halconf.h
index e3c075936d..1fc1b548a2 100644
--- a/keyboards/handwired/onekey/at_start_f415/halconf.h
+++ b/keyboards/handwired/onekey/at_start_f415/halconf.h
@@ -10,4 +10,7 @@
10 10
11#define HAL_USE_PWM TRUE 11#define HAL_USE_PWM TRUE
12 12
13#define HAL_USE_SPI TRUE
14#define SPI_USE_WAIT TRUE
15
13#include_next <halconf.h> 16#include_next <halconf.h>
diff --git a/keyboards/handwired/onekey/at_start_f415/keyboard.json b/keyboards/handwired/onekey/at_start_f415/keyboard.json
index 6e5683a474..8024e776a8 100644
--- a/keyboards/handwired/onekey/at_start_f415/keyboard.json
+++ b/keyboards/handwired/onekey/at_start_f415/keyboard.json
@@ -16,7 +16,7 @@
16 }, 16 },
17 "ws2812": { 17 "ws2812": {
18 "pin": "B0" 18 "pin": "B0"
19 } 19 },
20 "apa102": { 20 "apa102": {
21 "data_pin": "B0", 21 "data_pin": "B0",
22 "clock_pin": "B1" 22 "clock_pin": "B1"
diff --git a/keyboards/handwired/onekey/at_start_f415/mcuconf.h b/keyboards/handwired/onekey/at_start_f415/mcuconf.h
index 246f6762d3..8f6333ca01 100644
--- a/keyboards/handwired/onekey/at_start_f415/mcuconf.h
+++ b/keyboards/handwired/onekey/at_start_f415/mcuconf.h
@@ -14,3 +14,6 @@
14 14
15#undef AT32_PWM_USE_TMR5 15#undef AT32_PWM_USE_TMR5
16#define AT32_PWM_USE_TMR5 TRUE 16#define AT32_PWM_USE_TMR5 TRUE
17
18#undef AT32_SPI_USE_SPI1
19#define AT32_SPI_USE_SPI1 TRUE
diff --git a/keyboards/handwired/onekey/kb2040/config.h b/keyboards/handwired/onekey/kb2040/config.h
index e9c4eef273..a9508bc4cc 100644
--- a/keyboards/handwired/onekey/kb2040/config.h
+++ b/keyboards/handwired/onekey/kb2040/config.h
@@ -16,3 +16,13 @@
16#define I2C1_SDA_PIN GP12 16#define I2C1_SDA_PIN GP12
17#define I2C1_SCL_PIN GP13 17#define I2C1_SCL_PIN GP13
18 18
19/* LCD configs */
20#define LCD_RST_PIN GP0
21#define LCD_DC_PIN GP1
22#define LCD_CS_PIN GP2
23
24/* SPI pins */
25#define SPI_DRIVER SPID0
26#define SPI_SCK_PIN GP18
27#define SPI_MOSI_PIN GP19
28#define SPI_MISO_PIN GP20
diff --git a/keyboards/handwired/onekey/kb2040/halconf.h b/keyboards/handwired/onekey/kb2040/halconf.h
new file mode 100644
index 0000000000..ce781aa374
--- /dev/null
+++ b/keyboards/handwired/onekey/kb2040/halconf.h
@@ -0,0 +1,22 @@
1/* Copyright 2020 QMK
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 2 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 <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19#define HAL_USE_SPI TRUE
20#define SPI_USE_WAIT TRUE
21
22#include_next <halconf.h>
diff --git a/keyboards/handwired/onekey/kb2040/mcuconf.h b/keyboards/handwired/onekey/kb2040/mcuconf.h
index 57e58e14d7..cc44ce77c3 100644
--- a/keyboards/handwired/onekey/kb2040/mcuconf.h
+++ b/keyboards/handwired/onekey/kb2040/mcuconf.h
@@ -22,3 +22,6 @@
22 22
23#undef RP_I2C_USE_I2C1 23#undef RP_I2C_USE_I2C1
24#define RP_I2C_USE_I2C1 TRUE 24#define RP_I2C_USE_I2C1 TRUE
25
26#undef RP_SPI_USE_SPI0
27#define RP_SPI_USE_SPI0 TRUE
diff --git a/keyboards/handwired/onekey/keymaps/lvgl/config.h b/keyboards/handwired/onekey/keymaps/lvgl/config.h
deleted file mode 100644
index 38bb5d0cf3..0000000000
--- a/keyboards/handwired/onekey/keymaps/lvgl/config.h
+++ /dev/null
@@ -1,15 +0,0 @@
1// Copyright 2022 Jose Pablo Ramirez (@jpe230)
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#pragma once
5
6/* SPI pins */
7#define SPI_DRIVER SPID0
8#define SPI_SCK_PIN GP18
9#define SPI_MOSI_PIN GP19
10#define SPI_MISO_PIN GP20
11
12/* LCD Configuration */
13#define LCD_RST_PIN GP0
14#define LCD_DC_PIN GP1
15#define LCD_CS_PIN GP2
diff --git a/keyboards/handwired/onekey/keymaps/lvgl/halconf.h b/keyboards/handwired/onekey/keymaps/lvgl/halconf.h
deleted file mode 100644
index 27646bb3f5..0000000000
--- a/keyboards/handwired/onekey/keymaps/lvgl/halconf.h
+++ /dev/null
@@ -1,12 +0,0 @@
1// Copyright 2022 Jose Pablo Ramirez (@jpe230)
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#pragma once
5
6#include_next <halconf.h>
7
8#undef HAL_USE_SPI
9#define HAL_USE_SPI TRUE
10
11#undef SPI_USE_WAIT
12#define SPI_USE_WAIT TRUE
diff --git a/keyboards/handwired/onekey/keymaps/lvgl/mcuconf.h b/keyboards/handwired/onekey/keymaps/lvgl/mcuconf.h
deleted file mode 100644
index bff74867ff..0000000000
--- a/keyboards/handwired/onekey/keymaps/lvgl/mcuconf.h
+++ /dev/null
@@ -1,9 +0,0 @@
1// Copyright 2022 Jose Pablo Ramirez (@jpe230)
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#pragma once
5
6#include_next <mcuconf.h>
7
8#undef RP_SPI_USE_SPI0
9#define RP_SPI_USE_SPI0 TRUE
diff --git a/keyboards/handwired/onekey/rp2040/config.h b/keyboards/handwired/onekey/rp2040/config.h
index 0030e97b0f..974fc688d3 100644
--- a/keyboards/handwired/onekey/rp2040/config.h
+++ b/keyboards/handwired/onekey/rp2040/config.h
@@ -17,3 +17,14 @@
17#define AUDIO_PWM_CHANNEL RP2040_PWM_CHANNEL_A 17#define AUDIO_PWM_CHANNEL RP2040_PWM_CHANNEL_A
18 18
19#define ADC_PIN GP26 19#define ADC_PIN GP26
20
21/* LCD configs */
22#define LCD_RST_PIN GP0
23#define LCD_DC_PIN GP1
24#define LCD_CS_PIN GP2
25
26/* SPI pins */
27#define SPI_DRIVER SPID0
28#define SPI_SCK_PIN GP18
29#define SPI_MOSI_PIN GP19
30#define SPI_MISO_PIN GP20
diff --git a/keyboards/handwired/onekey/rp2040/halconf.h b/keyboards/handwired/onekey/rp2040/halconf.h
index ec56be2263..da4a49b5c1 100644
--- a/keyboards/handwired/onekey/rp2040/halconf.h
+++ b/keyboards/handwired/onekey/rp2040/halconf.h
@@ -4,7 +4,12 @@
4#pragma once 4#pragma once
5 5
6#define HAL_USE_I2C TRUE 6#define HAL_USE_I2C TRUE
7
7#define HAL_USE_PWM TRUE 8#define HAL_USE_PWM TRUE
9
8#define HAL_USE_ADC TRUE 10#define HAL_USE_ADC TRUE
9 11
12#define HAL_USE_SPI TRUE
13#define SPI_USE_WAIT TRUE
14
10#include_next <halconf.h> 15#include_next <halconf.h>
diff --git a/keyboards/handwired/onekey/rp2040/mcuconf.h b/keyboards/handwired/onekey/rp2040/mcuconf.h
index e24a0d4f24..c1d22657ca 100644
--- a/keyboards/handwired/onekey/rp2040/mcuconf.h
+++ b/keyboards/handwired/onekey/rp2040/mcuconf.h
@@ -10,3 +10,6 @@
10 10
11#undef RP_PWM_USE_PWM4 11#undef RP_PWM_USE_PWM4
12#define RP_PWM_USE_PWM4 TRUE 12#define RP_PWM_USE_PWM4 TRUE
13
14#undef RP_SPI_USE_SPI0
15#define RP_SPI_USE_SPI0 TRUE