summaryrefslogtreecommitdiff
path: root/keyboards/handwired/onekey
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/handwired/onekey')
-rw-r--r--keyboards/handwired/onekey/blackpill_f401/config.h1
-rw-r--r--keyboards/handwired/onekey/blackpill_f401/halconf.h2
-rw-r--r--keyboards/handwired/onekey/blackpill_f401/mcuconf.h3
-rw-r--r--keyboards/handwired/onekey/blackpill_f411/config.h1
-rw-r--r--keyboards/handwired/onekey/blackpill_f411/halconf.h2
-rw-r--r--keyboards/handwired/onekey/blackpill_f411/mcuconf.h3
-rwxr-xr-xkeyboards/handwired/onekey/blackpill_f411_tinyuf2/config.h1
-rw-r--r--keyboards/handwired/onekey/blackpill_f411_tinyuf2/halconf.h3
-rwxr-xr-xkeyboards/handwired/onekey/blackpill_f411_tinyuf2/mcuconf.h3
-rw-r--r--keyboards/handwired/onekey/bluepill/halconf.h2
-rw-r--r--keyboards/handwired/onekey/bluepill/mcuconf.h3
-rw-r--r--keyboards/handwired/onekey/bluepill_f103c6/halconf.h2
-rw-r--r--keyboards/handwired/onekey/bluepill_f103c6/mcuconf.h3
-rw-r--r--keyboards/handwired/onekey/evb_wb32f3g71/config.h25
-rw-r--r--keyboards/handwired/onekey/evb_wb32f3g71/halconf.h11
-rw-r--r--keyboards/handwired/onekey/evb_wb32f3g71/info.json6
-rw-r--r--keyboards/handwired/onekey/evb_wb32f3g71/mcuconf.h17
-rw-r--r--keyboards/handwired/onekey/evb_wb32f3g71/rules.mk4
-rw-r--r--keyboards/handwired/onekey/evb_wb32fq95/config.h25
-rw-r--r--keyboards/handwired/onekey/evb_wb32fq95/halconf.h11
-rw-r--r--keyboards/handwired/onekey/evb_wb32fq95/info.json6
-rw-r--r--keyboards/handwired/onekey/evb_wb32fq95/mcuconf.h17
-rw-r--r--keyboards/handwired/onekey/evb_wb32fq95/rules.mk4
-rw-r--r--keyboards/handwired/onekey/keymaps/apa102/config.h11
-rw-r--r--keyboards/handwired/onekey/keymaps/apa102/keymap.c2
-rw-r--r--keyboards/handwired/onekey/keymaps/chibios_waiting_test/keymap.c4
-rw-r--r--keyboards/handwired/onekey/keymaps/eep_rst/keymap.c2
-rw-r--r--keyboards/handwired/onekey/keymaps/joystick/keymap.c8
-rw-r--r--keyboards/handwired/onekey/keymaps/rgb/config.h11
-rw-r--r--keyboards/handwired/onekey/keymaps/rgb/keymap.c2
-rw-r--r--keyboards/handwired/onekey/rp2040/config.h7
-rw-r--r--keyboards/handwired/onekey/rp2040/halconf.h9
-rw-r--r--keyboards/handwired/onekey/rp2040/info.json5
-rw-r--r--keyboards/handwired/onekey/rp2040/mcuconf.h12
-rw-r--r--keyboards/handwired/onekey/stm32f0_disco/halconf.h2
-rw-r--r--keyboards/handwired/onekey/stm32f0_disco/mcuconf.h3
36 files changed, 213 insertions, 20 deletions
diff --git a/keyboards/handwired/onekey/blackpill_f401/config.h b/keyboards/handwired/onekey/blackpill_f401/config.h
index 4e9552480f..05f3f07763 100644
--- a/keyboards/handwired/onekey/blackpill_f401/config.h
+++ b/keyboards/handwired/onekey/blackpill_f401/config.h
@@ -20,6 +20,7 @@
#define BACKLIGHT_PWM_DRIVER PWMD5
#define BACKLIGHT_PWM_CHANNEL 1
+#define BACKLIGHT_PAL_MODE 2
#define ADC_PIN A0
diff --git a/keyboards/handwired/onekey/blackpill_f401/halconf.h b/keyboards/handwired/onekey/blackpill_f401/halconf.h
index 020a7722f0..4982bb5b49 100644
--- a/keyboards/handwired/onekey/blackpill_f401/halconf.h
+++ b/keyboards/handwired/onekey/blackpill_f401/halconf.h
@@ -21,6 +21,8 @@
#pragma once
+#define HAL_USE_ADC TRUE
+
#define HAL_USE_I2C TRUE
#define HAL_USE_PWM TRUE
diff --git a/keyboards/handwired/onekey/blackpill_f401/mcuconf.h b/keyboards/handwired/onekey/blackpill_f401/mcuconf.h
index e614a9dfa9..1aa0fe4ce7 100644
--- a/keyboards/handwired/onekey/blackpill_f401/mcuconf.h
+++ b/keyboards/handwired/onekey/blackpill_f401/mcuconf.h
@@ -18,6 +18,9 @@
#include_next "mcuconf.h"
+#undef STM32_ADC_USE_ADC1
+#define STM32_ADC_USE_ADC1 TRUE
+
#undef STM32_I2C_USE_I2C1
#define STM32_I2C_USE_I2C1 TRUE
diff --git a/keyboards/handwired/onekey/blackpill_f411/config.h b/keyboards/handwired/onekey/blackpill_f411/config.h
index b97df0c666..c890043b09 100644
--- a/keyboards/handwired/onekey/blackpill_f411/config.h
+++ b/keyboards/handwired/onekey/blackpill_f411/config.h
@@ -20,6 +20,7 @@
#define BACKLIGHT_PWM_DRIVER PWMD5
#define BACKLIGHT_PWM_CHANNEL 1
+#define BACKLIGHT_PAL_MODE 2
#define ADC_PIN A0
diff --git a/keyboards/handwired/onekey/blackpill_f411/halconf.h b/keyboards/handwired/onekey/blackpill_f411/halconf.h
index 4a0da20890..8225cc7208 100644
--- a/keyboards/handwired/onekey/blackpill_f411/halconf.h
+++ b/keyboards/handwired/onekey/blackpill_f411/halconf.h
@@ -21,6 +21,8 @@
#pragma once
+#define HAL_USE_ADC TRUE
+
#define HAL_USE_I2C TRUE
#define HAL_USE_PWM TRUE
diff --git a/keyboards/handwired/onekey/blackpill_f411/mcuconf.h b/keyboards/handwired/onekey/blackpill_f411/mcuconf.h
index e614a9dfa9..1aa0fe4ce7 100644
--- a/keyboards/handwired/onekey/blackpill_f411/mcuconf.h
+++ b/keyboards/handwired/onekey/blackpill_f411/mcuconf.h
@@ -18,6 +18,9 @@
#include_next "mcuconf.h"
+#undef STM32_ADC_USE_ADC1
+#define STM32_ADC_USE_ADC1 TRUE
+
#undef STM32_I2C_USE_I2C1
#define STM32_I2C_USE_I2C1 TRUE
diff --git a/keyboards/handwired/onekey/blackpill_f411_tinyuf2/config.h b/keyboards/handwired/onekey/blackpill_f411_tinyuf2/config.h
index c8800fa163..2b60320fc1 100755
--- a/keyboards/handwired/onekey/blackpill_f411_tinyuf2/config.h
+++ b/keyboards/handwired/onekey/blackpill_f411_tinyuf2/config.h
@@ -20,6 +20,7 @@
#define BACKLIGHT_PWM_DRIVER PWMD5
#define BACKLIGHT_PWM_CHANNEL 1
+#define BACKLIGHT_PAL_MODE 2
#define ADC_PIN A0
diff --git a/keyboards/handwired/onekey/blackpill_f411_tinyuf2/halconf.h b/keyboards/handwired/onekey/blackpill_f411_tinyuf2/halconf.h
index e15870984f..00aca25c36 100644
--- a/keyboards/handwired/onekey/blackpill_f411_tinyuf2/halconf.h
+++ b/keyboards/handwired/onekey/blackpill_f411_tinyuf2/halconf.h
@@ -16,7 +16,10 @@
#pragma once
+#define HAL_USE_ADC TRUE
+
#define HAL_USE_I2C TRUE
+
#define HAL_USE_PWM TRUE
#include_next <halconf.h>
diff --git a/keyboards/handwired/onekey/blackpill_f411_tinyuf2/mcuconf.h b/keyboards/handwired/onekey/blackpill_f411_tinyuf2/mcuconf.h
index d003af03e5..fcb7d84f96 100755
--- a/keyboards/handwired/onekey/blackpill_f411_tinyuf2/mcuconf.h
+++ b/keyboards/handwired/onekey/blackpill_f411_tinyuf2/mcuconf.h
@@ -18,6 +18,9 @@
#include_next "mcuconf.h"
+#undef STM32_ADC_USE_ADC1
+#define STM32_ADC_USE_ADC1 TRUE
+
#undef STM32_I2C_USE_I2C1
#define STM32_I2C_USE_I2C1 TRUE
diff --git a/keyboards/handwired/onekey/bluepill/halconf.h b/keyboards/handwired/onekey/bluepill/halconf.h
index 923b4e52d2..dbc3e82a79 100644
--- a/keyboards/handwired/onekey/bluepill/halconf.h
+++ b/keyboards/handwired/onekey/bluepill/halconf.h
@@ -21,6 +21,8 @@
#pragma once
+#define HAL_USE_ADC TRUE
+
#define HAL_USE_PWM TRUE
#include_next <halconf.h>
diff --git a/keyboards/handwired/onekey/bluepill/mcuconf.h b/keyboards/handwired/onekey/bluepill/mcuconf.h
index 5e94a97e21..39834c135b 100644
--- a/keyboards/handwired/onekey/bluepill/mcuconf.h
+++ b/keyboards/handwired/onekey/bluepill/mcuconf.h
@@ -23,6 +23,9 @@
#include_next <mcuconf.h>
+#undef STM32_ADC_USE_ADC1
+#define STM32_ADC_USE_ADC1 TRUE
+
#undef STM32_PWM_USE_TIM2
#define STM32_PWM_USE_TIM2 TRUE
diff --git a/keyboards/handwired/onekey/bluepill_f103c6/halconf.h b/keyboards/handwired/onekey/bluepill_f103c6/halconf.h
index 923b4e52d2..dbc3e82a79 100644
--- a/keyboards/handwired/onekey/bluepill_f103c6/halconf.h
+++ b/keyboards/handwired/onekey/bluepill_f103c6/halconf.h
@@ -21,6 +21,8 @@
#pragma once
+#define HAL_USE_ADC TRUE
+
#define HAL_USE_PWM TRUE
#include_next <halconf.h>
diff --git a/keyboards/handwired/onekey/bluepill_f103c6/mcuconf.h b/keyboards/handwired/onekey/bluepill_f103c6/mcuconf.h
index 5e94a97e21..39834c135b 100644
--- a/keyboards/handwired/onekey/bluepill_f103c6/mcuconf.h
+++ b/keyboards/handwired/onekey/bluepill_f103c6/mcuconf.h
@@ -23,6 +23,9 @@
#include_next <mcuconf.h>
+#undef STM32_ADC_USE_ADC1
+#define STM32_ADC_USE_ADC1 TRUE
+
#undef STM32_PWM_USE_TIM2
#define STM32_PWM_USE_TIM2 TRUE
diff --git a/keyboards/handwired/onekey/evb_wb32f3g71/config.h b/keyboards/handwired/onekey/evb_wb32f3g71/config.h
new file mode 100644
index 0000000000..d1f87b4e3e
--- /dev/null
+++ b/keyboards/handwired/onekey/evb_wb32f3g71/config.h
@@ -0,0 +1,25 @@
+// Copyright 2022 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include "config_common.h"
+
+#define ADC_PIN A0
+
+#define BACKLIGHT_PWM_DRIVER PWMD4
+#define BACKLIGHT_PWM_CHANNEL 3
+#define BACKLIGHT_PAL_MODE 2
+
+#define APA102_NOPS (100 / (1000000000L / (CPU_CLOCK / 4)))
+#define RGB_CI_PIN B8
+
+#define SOLENOID_PIN B12
+#define SOLENOID_PINS { B12, B13, B14, B15 }
+#define SOLENOID_PINS_ACTIVE_STATE { high, high, low }
+
+#define I2C1_SDA_PIN B7
+#define I2C1_SCL_PIN B6
+#define I2C1_SCL_PAL_MODE 4
+#define I2C1_OPMODE OPMODE_I2C
+#define I2C1_CLOCK_SPEED 100000
diff --git a/keyboards/handwired/onekey/evb_wb32f3g71/halconf.h b/keyboards/handwired/onekey/evb_wb32f3g71/halconf.h
new file mode 100644
index 0000000000..f0cf0a179f
--- /dev/null
+++ b/keyboards/handwired/onekey/evb_wb32f3g71/halconf.h
@@ -0,0 +1,11 @@
+// Copyright 2022 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
+#pragma once
+
+#define HAL_USE_ADC TRUE
+
+#define HAL_USE_I2C TRUE
+
+#define HAL_USE_PWM TRUE
+
+#include_next <halconf.h>
diff --git a/keyboards/handwired/onekey/evb_wb32f3g71/info.json b/keyboards/handwired/onekey/evb_wb32f3g71/info.json
index 6287cdc34a..304517d266 100644
--- a/keyboards/handwired/onekey/evb_wb32f3g71/info.json
+++ b/keyboards/handwired/onekey/evb_wb32f3g71/info.json
@@ -5,5 +5,11 @@
"matrix_pins": {
"cols": ["B12"],
"rows": ["B13"]
+ },
+ "backlight": {
+ "pin": "B8"
+ },
+ "rgblight": {
+ "pin": "A0"
}
}
diff --git a/keyboards/handwired/onekey/evb_wb32f3g71/mcuconf.h b/keyboards/handwired/onekey/evb_wb32f3g71/mcuconf.h
new file mode 100644
index 0000000000..7ef36ff66c
--- /dev/null
+++ b/keyboards/handwired/onekey/evb_wb32f3g71/mcuconf.h
@@ -0,0 +1,17 @@
+// Copyright 2022 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
+#pragma once
+
+#include_next "mcuconf.h"
+
+#undef WB32_ADC_USE_ADC1
+#define WB32_ADC_USE_ADC1 TRUE
+
+#undef WB32_DMA_REQUIRED
+#define WB32_DMA_REQUIRED TRUE
+
+#undef WB32_I2C_USE_I2C1
+#define WB32_I2C_USE_I2C1 TRUE
+
+#undef WB32_PWM_USE_TIM4
+#define WB32_PWM_USE_TIM4 TRUE
diff --git a/keyboards/handwired/onekey/evb_wb32f3g71/rules.mk b/keyboards/handwired/onekey/evb_wb32f3g71/rules.mk
index 033dd66aa4..1071cf62ee 100644
--- a/keyboards/handwired/onekey/evb_wb32f3g71/rules.mk
+++ b/keyboards/handwired/onekey/evb_wb32f3g71/rules.mk
@@ -1,3 +1 @@
-MOUSEKEY_ENABLE = no # Mouse keys
-EXTRAKEY_ENABLE = no # Audio control and System control
-NKRO_ENABLE = no # Enable N-Key Rollover
+KEYBOARD_SHARED_EP = yes
diff --git a/keyboards/handwired/onekey/evb_wb32fq95/config.h b/keyboards/handwired/onekey/evb_wb32fq95/config.h
new file mode 100644
index 0000000000..d1f87b4e3e
--- /dev/null
+++ b/keyboards/handwired/onekey/evb_wb32fq95/config.h
@@ -0,0 +1,25 @@
+// Copyright 2022 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include "config_common.h"
+
+#define ADC_PIN A0
+
+#define BACKLIGHT_PWM_DRIVER PWMD4
+#define BACKLIGHT_PWM_CHANNEL 3
+#define BACKLIGHT_PAL_MODE 2
+
+#define APA102_NOPS (100 / (1000000000L / (CPU_CLOCK / 4)))
+#define RGB_CI_PIN B8
+
+#define SOLENOID_PIN B12
+#define SOLENOID_PINS { B12, B13, B14, B15 }
+#define SOLENOID_PINS_ACTIVE_STATE { high, high, low }
+
+#define I2C1_SDA_PIN B7
+#define I2C1_SCL_PIN B6
+#define I2C1_SCL_PAL_MODE 4
+#define I2C1_OPMODE OPMODE_I2C
+#define I2C1_CLOCK_SPEED 100000
diff --git a/keyboards/handwired/onekey/evb_wb32fq95/halconf.h b/keyboards/handwired/onekey/evb_wb32fq95/halconf.h
new file mode 100644
index 0000000000..f0cf0a179f
--- /dev/null
+++ b/keyboards/handwired/onekey/evb_wb32fq95/halconf.h
@@ -0,0 +1,11 @@
+// Copyright 2022 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
+#pragma once
+
+#define HAL_USE_ADC TRUE
+
+#define HAL_USE_I2C TRUE
+
+#define HAL_USE_PWM TRUE
+
+#include_next <halconf.h>
diff --git a/keyboards/handwired/onekey/evb_wb32fq95/info.json b/keyboards/handwired/onekey/evb_wb32fq95/info.json
index 3fc1c88657..bbf5139668 100644
--- a/keyboards/handwired/onekey/evb_wb32fq95/info.json
+++ b/keyboards/handwired/onekey/evb_wb32fq95/info.json
@@ -5,5 +5,11 @@
"matrix_pins": {
"cols": ["B12"],
"rows": ["B13"]
+ },
+ "backlight": {
+ "pin": "B8"
+ },
+ "rgblight": {
+ "pin": "A0"
}
}
diff --git a/keyboards/handwired/onekey/evb_wb32fq95/mcuconf.h b/keyboards/handwired/onekey/evb_wb32fq95/mcuconf.h
new file mode 100644
index 0000000000..7ef36ff66c
--- /dev/null
+++ b/keyboards/handwired/onekey/evb_wb32fq95/mcuconf.h
@@ -0,0 +1,17 @@
+// Copyright 2022 QMK
+// SPDX-License-Identifier: GPL-2.0-or-later
+#pragma once
+
+#include_next "mcuconf.h"
+
+#undef WB32_ADC_USE_ADC1
+#define WB32_ADC_USE_ADC1 TRUE
+
+#undef WB32_DMA_REQUIRED
+#define WB32_DMA_REQUIRED TRUE
+
+#undef WB32_I2C_USE_I2C1
+#define WB32_I2C_USE_I2C1 TRUE
+
+#undef WB32_PWM_USE_TIM4
+#define WB32_PWM_USE_TIM4 TRUE
diff --git a/keyboards/handwired/onekey/evb_wb32fq95/rules.mk b/keyboards/handwired/onekey/evb_wb32fq95/rules.mk
index 033dd66aa4..1071cf62ee 100644
--- a/keyboards/handwired/onekey/evb_wb32fq95/rules.mk
+++ b/keyboards/handwired/onekey/evb_wb32fq95/rules.mk
@@ -1,3 +1 @@
-MOUSEKEY_ENABLE = no # Mouse keys
-EXTRAKEY_ENABLE = no # Audio control and System control
-NKRO_ENABLE = no # Enable N-Key Rollover
+KEYBOARD_SHARED_EP = yes
diff --git a/keyboards/handwired/onekey/keymaps/apa102/config.h b/keyboards/handwired/onekey/keymaps/apa102/config.h
index aeb22a261b..756ebb3593 100644
--- a/keyboards/handwired/onekey/keymaps/apa102/config.h
+++ b/keyboards/handwired/onekey/keymaps/apa102/config.h
@@ -2,4 +2,13 @@
#define RGBLED_NUM 40
#define APA102_DEFAULT_BRIGHTNESS 5
-#define RGBLIGHT_ANIMATIONS
+#define RGBLIGHT_EFFECT_BREATHING
+#define RGBLIGHT_EFFECT_RAINBOW_MOOD
+#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+#define RGBLIGHT_EFFECT_SNAKE
+#define RGBLIGHT_EFFECT_KNIGHT
+#define RGBLIGHT_EFFECT_CHRISTMAS
+#define RGBLIGHT_EFFECT_STATIC_GRADIENT
+#define RGBLIGHT_EFFECT_RGB_TEST
+#define RGBLIGHT_EFFECT_ALTERNATING
+#define RGBLIGHT_EFFECT_TWINKLE
diff --git a/keyboards/handwired/onekey/keymaps/apa102/keymap.c b/keyboards/handwired/onekey/keymaps/apa102/keymap.c
index 700755a452..8b4191fb28 100644
--- a/keyboards/handwired/onekey/keymaps/apa102/keymap.c
+++ b/keyboards/handwired/onekey/keymaps/apa102/keymap.c
@@ -9,6 +9,6 @@ void keyboard_post_init_user(void) {
apa102_set_brightness(5);
rgblight_enable_noeeprom();
- rgblight_sethsv_noeeprom_cyan();
+ rgblight_sethsv_noeeprom(HSV_CYAN);
rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL);
}
diff --git a/keyboards/handwired/onekey/keymaps/chibios_waiting_test/keymap.c b/keyboards/handwired/onekey/keymaps/chibios_waiting_test/keymap.c
index ecf67d3b3c..65983c8dd8 100644
--- a/keyboards/handwired/onekey/keymaps/chibios_waiting_test/keymap.c
+++ b/keyboards/handwired/onekey/keymaps/chibios_waiting_test/keymap.c
@@ -34,11 +34,11 @@ static const uint32_t waiting_values[] = {0, 1, 5, 10, 25, 50, 100, 150, 200, 50
void housekeeping_task_user(void) {
static uint32_t last_bench = 0;
if (timer_elapsed32(last_bench) > 500) {
- for (int i = 0; i < (sizeof(waiting_values) / sizeof(waiting_values[0])); i++) {
+ for (int i = 0; i < ARRAY_SIZE(waiting_values); i++) {
wait_us_polling_with_strobe(waiting_values[i]);
wait_us(10);
}
- for (int i = 0; i < (sizeof(waiting_values) / sizeof(waiting_values[0])); i++) {
+ for (int i = 0; i < ARRAY_SIZE(waiting_values); i++) {
wait_us_yield_with_strobe(waiting_values[i]);
wait_us(10);
}
diff --git a/keyboards/handwired/onekey/keymaps/eep_rst/keymap.c b/keyboards/handwired/onekey/keymaps/eep_rst/keymap.c
index 3f7a6b8502..e206b6b39f 100644
--- a/keyboards/handwired/onekey/keymaps/eep_rst/keymap.c
+++ b/keyboards/handwired/onekey/keymaps/eep_rst/keymap.c
@@ -1,5 +1,5 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- LAYOUT_ortho_1x1(EEP_RST)
+ LAYOUT_ortho_1x1(EE_CLR)
};
diff --git a/keyboards/handwired/onekey/keymaps/joystick/keymap.c b/keyboards/handwired/onekey/keymaps/joystick/keymap.c
index 7a2f138b28..96115aa496 100644
--- a/keyboards/handwired/onekey/keymaps/joystick/keymap.c
+++ b/keyboards/handwired/onekey/keymaps/joystick/keymap.c
@@ -5,16 +5,12 @@
#endif
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- LAYOUT_ortho_1x1(JS_BUTTON0)
+ LAYOUT_ortho_1x1(JS_0)
};
void matrix_scan_user() {
int16_t val = (((uint32_t)timer_read() % 5000 - 2500) * 255) / 5000;
-
- if (val != joystick_status.axes[1]) {
- joystick_status.axes[1] = val;
- joystick_status.status |= JS_UPDATED;
- }
+ joystick_set_axis(1, val);
}
// Joystick config
diff --git a/keyboards/handwired/onekey/keymaps/rgb/config.h b/keyboards/handwired/onekey/keymaps/rgb/config.h
index 89e76326b4..1e54383769 100644
--- a/keyboards/handwired/onekey/keymaps/rgb/config.h
+++ b/keyboards/handwired/onekey/keymaps/rgb/config.h
@@ -1,4 +1,13 @@
#pragma once
#define RGBLED_NUM 9
-#define RGBLIGHT_ANIMATIONS
+#define RGBLIGHT_EFFECT_BREATHING
+#define RGBLIGHT_EFFECT_RAINBOW_MOOD
+#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+#define RGBLIGHT_EFFECT_SNAKE
+#define RGBLIGHT_EFFECT_KNIGHT
+#define RGBLIGHT_EFFECT_CHRISTMAS
+#define RGBLIGHT_EFFECT_STATIC_GRADIENT
+#define RGBLIGHT_EFFECT_RGB_TEST
+#define RGBLIGHT_EFFECT_ALTERNATING
+#define RGBLIGHT_EFFECT_TWINKLE
diff --git a/keyboards/handwired/onekey/keymaps/rgb/keymap.c b/keyboards/handwired/onekey/keymaps/rgb/keymap.c
index c3e77f1ec1..c99eb86339 100644
--- a/keyboards/handwired/onekey/keymaps/rgb/keymap.c
+++ b/keyboards/handwired/onekey/keymaps/rgb/keymap.c
@@ -6,6 +6,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
void keyboard_post_init_user(void) {
rgblight_enable_noeeprom();
- rgblight_sethsv_noeeprom_cyan();
+ rgblight_sethsv_noeeprom(HSV_CYAN);
rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL);
}
diff --git a/keyboards/handwired/onekey/rp2040/config.h b/keyboards/handwired/onekey/rp2040/config.h
index bcf4047a4f..d3e7b5c076 100644
--- a/keyboards/handwired/onekey/rp2040/config.h
+++ b/keyboards/handwired/onekey/rp2040/config.h
@@ -13,3 +13,10 @@
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP25
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 500U
+
+#define BACKLIGHT_PWM_DRIVER PWMD4
+#define BACKLIGHT_PWM_CHANNEL RP2040_PWM_CHANNEL_B
+
+#define AUDIO_PIN GP16
+#define AUDIO_PWM_DRIVER PWMD0
+#define AUDIO_PWM_CHANNEL RP2040_PWM_CHANNEL_A
diff --git a/keyboards/handwired/onekey/rp2040/halconf.h b/keyboards/handwired/onekey/rp2040/halconf.h
new file mode 100644
index 0000000000..5890122e5e
--- /dev/null
+++ b/keyboards/handwired/onekey/rp2040/halconf.h
@@ -0,0 +1,9 @@
+// Copyright 2022 Stefan Kerkmann
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#define HAL_USE_I2C TRUE
+#define HAL_USE_PWM TRUE
+
+#include_next <halconf.h>
diff --git a/keyboards/handwired/onekey/rp2040/info.json b/keyboards/handwired/onekey/rp2040/info.json
index b34a1cc206..32bde911bb 100644
--- a/keyboards/handwired/onekey/rp2040/info.json
+++ b/keyboards/handwired/onekey/rp2040/info.json
@@ -6,7 +6,10 @@
"cols": ["GP4"],
"rows": ["GP5"]
},
+ "backlight": {
+ "pin": "GP25"
+ },
"rgblight": {
- "pin": "A1"
+ "pin": "GP25"
}
}
diff --git a/keyboards/handwired/onekey/rp2040/mcuconf.h b/keyboards/handwired/onekey/rp2040/mcuconf.h
new file mode 100644
index 0000000000..5c2587395d
--- /dev/null
+++ b/keyboards/handwired/onekey/rp2040/mcuconf.h
@@ -0,0 +1,12 @@
+// Copyright 2022 Stefan Kerkmann
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include_next "mcuconf.h"
+
+#undef RP_PWM_USE_PWM0
+#define RP_PWM_USE_PWM0 TRUE
+
+#undef RP_PWM_USE_PWM4
+#define RP_PWM_USE_PWM4 TRUE
diff --git a/keyboards/handwired/onekey/stm32f0_disco/halconf.h b/keyboards/handwired/onekey/stm32f0_disco/halconf.h
index 78ed6586c8..432c43c6cc 100644
--- a/keyboards/handwired/onekey/stm32f0_disco/halconf.h
+++ b/keyboards/handwired/onekey/stm32f0_disco/halconf.h
@@ -21,6 +21,8 @@
#pragma once
+#define HAL_USE_ADC TRUE
+
#define HAL_USE_PWM TRUE
#include_next <halconf.h>
diff --git a/keyboards/handwired/onekey/stm32f0_disco/mcuconf.h b/keyboards/handwired/onekey/stm32f0_disco/mcuconf.h
index ea4f9373a0..0bb4f4d643 100644
--- a/keyboards/handwired/onekey/stm32f0_disco/mcuconf.h
+++ b/keyboards/handwired/onekey/stm32f0_disco/mcuconf.h
@@ -23,5 +23,8 @@
#include_next <mcuconf.h>
+#undef STM32_ADC_USE_ADC1
+#define STM32_ADC_USE_ADC1 TRUE
+
#undef STM32_PWM_USE_TIM3
#define STM32_PWM_USE_TIM3 TRUE