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/keymaps/apa102/config.h11
-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/rp2040/config.h3
-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.h9
-rw-r--r--keyboards/handwired/onekey/stm32f0_disco/halconf.h2
-rw-r--r--keyboards/handwired/onekey/stm32f0_disco/mcuconf.h3
24 files changed, 84 insertions, 12 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/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/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/rp2040/config.h b/keyboards/handwired/onekey/rp2040/config.h
index bcf4047a4f..82c5592dc9 100644
--- a/keyboards/handwired/onekey/rp2040/config.h
+++ b/keyboards/handwired/onekey/rp2040/config.h
@@ -13,3 +13,6 @@
#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
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..86f821640f
--- /dev/null
+++ b/keyboards/handwired/onekey/rp2040/mcuconf.h
@@ -0,0 +1,9 @@
+// Copyright 2022 Stefan Kerkmann
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include_next "mcuconf.h"
+
+#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