diff options
| author | Stefan Kerkmann <karlk90@pm.me> | 2025-05-19 07:51:28 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-19 15:51:28 +1000 |
| commit | f686ad9e6361e05fcfa78f453f90cd72181a7516 (patch) | |
| tree | f0ba7f854ecdf22b0825071e32b85d66a9aaef84 /keyboards/handwired | |
| parent | a4ef1ae736cd58375affed966cf1399fe8df5774 (diff) | |
[Core] STM32G0x1 support (#24301)
Diffstat (limited to 'keyboards/handwired')
| -rw-r--r-- | keyboards/handwired/onekey/weact_g0b1cb/config.h | 28 | ||||
| -rw-r--r-- | keyboards/handwired/onekey/weact_g0b1cb/halconf.h | 11 | ||||
| -rw-r--r-- | keyboards/handwired/onekey/weact_g0b1cb/keyboard.json | 20 | ||||
| -rw-r--r-- | keyboards/handwired/onekey/weact_g0b1cb/mcuconf.h | 18 | ||||
| -rw-r--r-- | keyboards/handwired/onekey/weact_g0b1cb/readme.md | 5 |
5 files changed, 82 insertions, 0 deletions
diff --git a/keyboards/handwired/onekey/weact_g0b1cb/config.h b/keyboards/handwired/onekey/weact_g0b1cb/config.h new file mode 100644 index 0000000000..b4550b15f4 --- /dev/null +++ b/keyboards/handwired/onekey/weact_g0b1cb/config.h | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | // Copyright 2025 Stefan Kerkmann (@karlk90) | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #pragma once | ||
| 5 | |||
| 6 | #define ADC_PIN A0 | ||
| 7 | |||
| 8 | #define BACKLIGHT_PAL_MODE 1 | ||
| 9 | #define BACKLIGHT_PWM_CHANNEL 1 | ||
| 10 | #define BACKLIGHT_PWM_DRIVER PWMD3 | ||
| 11 | |||
| 12 | #define I2C1_SCL_PAL_MODE 6 | ||
| 13 | #define I2C1_SDA_PAL_MODE 6 | ||
| 14 | |||
| 15 | #define LCD_RST_PIN B12 | ||
| 16 | #define LCD_DC_PIN B11 | ||
| 17 | #define LCD_CS_PIN B10 | ||
| 18 | |||
| 19 | #define SPI_MOSI_PAL_MODE 0 | ||
| 20 | #define SPI_MISO_PAL_MODE 0 | ||
| 21 | #define SPI_SCK_PAL_MODE 0 | ||
| 22 | |||
| 23 | #define WS2812_PWM_CHANNEL 3 | ||
| 24 | #define WS2812_PWM_DMA_CHANNEL 2 | ||
| 25 | #define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2 | ||
| 26 | #define WS2812_PWM_DMAMUX_ID STM32_DMAMUX1_TIM3_UP | ||
| 27 | #define WS2812_PWM_DRIVER PWMD3 | ||
| 28 | #define WS2812_PWM_PAL_MODE 1 | ||
diff --git a/keyboards/handwired/onekey/weact_g0b1cb/halconf.h b/keyboards/handwired/onekey/weact_g0b1cb/halconf.h new file mode 100644 index 0000000000..2d6f87eba2 --- /dev/null +++ b/keyboards/handwired/onekey/weact_g0b1cb/halconf.h | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | // Copyright 2025 Stefan Kerkmann (@karlk90) | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #pragma once | ||
| 5 | |||
| 6 | #define HAL_USE_ADC TRUE | ||
| 7 | #define HAL_USE_I2C TRUE | ||
| 8 | #define HAL_USE_PWM TRUE | ||
| 9 | #define HAL_USE_SPI TRUE | ||
| 10 | |||
| 11 | #include_next <halconf.h> | ||
diff --git a/keyboards/handwired/onekey/weact_g0b1cb/keyboard.json b/keyboards/handwired/onekey/weact_g0b1cb/keyboard.json new file mode 100644 index 0000000000..bb1ce7d5ca --- /dev/null +++ b/keyboards/handwired/onekey/weact_g0b1cb/keyboard.json | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "Onekey WeAct G0B1CB", | ||
| 3 | "processor": "STM32G0B1", | ||
| 4 | "bootloader": "stm32-dfu", | ||
| 5 | "matrix_pins": { | ||
| 6 | "cols": ["B4"], | ||
| 7 | "rows": ["B5"] | ||
| 8 | }, | ||
| 9 | "backlight": { | ||
| 10 | "pin": "C6" | ||
| 11 | }, | ||
| 12 | "ws2812": { | ||
| 13 | "driver": "pwm", | ||
| 14 | "pin": "B0" | ||
| 15 | }, | ||
| 16 | "apa102": { | ||
| 17 | "data_pin": "B15", | ||
| 18 | "clock_pin": "B13" | ||
| 19 | } | ||
| 20 | } | ||
diff --git a/keyboards/handwired/onekey/weact_g0b1cb/mcuconf.h b/keyboards/handwired/onekey/weact_g0b1cb/mcuconf.h new file mode 100644 index 0000000000..50f2bcf627 --- /dev/null +++ b/keyboards/handwired/onekey/weact_g0b1cb/mcuconf.h | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | // Copyright 2025 Stefan Kerkmann (@karlk90) | ||
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | ||
| 3 | |||
| 4 | #pragma once | ||
| 5 | |||
| 6 | #include_next <mcuconf.h> | ||
| 7 | |||
| 8 | #undef STM32_ADC_USE_ADC1 | ||
| 9 | #define STM32_ADC_USE_ADC1 TRUE | ||
| 10 | |||
| 11 | #undef STM32_PWM_USE_TIM3 | ||
| 12 | #define STM32_PWM_USE_TIM3 TRUE | ||
| 13 | |||
| 14 | #undef STM32_I2C_USE_I2C1 | ||
| 15 | #define STM32_I2C_USE_I2C1 TRUE | ||
| 16 | |||
| 17 | #undef STM32_SPI_USE_SPI2 | ||
| 18 | #define STM32_SPI_USE_SPI2 TRUE | ||
diff --git a/keyboards/handwired/onekey/weact_g0b1cb/readme.md b/keyboards/handwired/onekey/weact_g0b1cb/readme.md new file mode 100644 index 0000000000..4119ffa2ed --- /dev/null +++ b/keyboards/handwired/onekey/weact_g0b1cb/readme.md | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | # WeAct Studio STM32G0B1CB onekey | ||
| 2 | |||
| 3 | Supported Hardware: <https://github.com/WeActStudio/WeActStudio.STM32G0B1CoreBoard> | ||
| 4 | |||
| 5 | To trigger keypress, short together pins *B4* and *B5*. | ||
