[Core] STM32G0x1 support (#24301)
This commit is contained in:
28
keyboards/handwired/onekey/weact_g0b1cb/config.h
Normal file
28
keyboards/handwired/onekey/weact_g0b1cb/config.h
Normal file
@@ -0,0 +1,28 @@
|
||||
// Copyright 2025 Stefan Kerkmann (@karlk90)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#define ADC_PIN A0
|
||||
|
||||
#define BACKLIGHT_PAL_MODE 1
|
||||
#define BACKLIGHT_PWM_CHANNEL 1
|
||||
#define BACKLIGHT_PWM_DRIVER PWMD3
|
||||
|
||||
#define I2C1_SCL_PAL_MODE 6
|
||||
#define I2C1_SDA_PAL_MODE 6
|
||||
|
||||
#define LCD_RST_PIN B12
|
||||
#define LCD_DC_PIN B11
|
||||
#define LCD_CS_PIN B10
|
||||
|
||||
#define SPI_MOSI_PAL_MODE 0
|
||||
#define SPI_MISO_PAL_MODE 0
|
||||
#define SPI_SCK_PAL_MODE 0
|
||||
|
||||
#define WS2812_PWM_CHANNEL 3
|
||||
#define WS2812_PWM_DMA_CHANNEL 2
|
||||
#define WS2812_PWM_DMA_STREAM STM32_DMA1_STREAM2
|
||||
#define WS2812_PWM_DMAMUX_ID STM32_DMAMUX1_TIM3_UP
|
||||
#define WS2812_PWM_DRIVER PWMD3
|
||||
#define WS2812_PWM_PAL_MODE 1
|
||||
11
keyboards/handwired/onekey/weact_g0b1cb/halconf.h
Normal file
11
keyboards/handwired/onekey/weact_g0b1cb/halconf.h
Normal file
@@ -0,0 +1,11 @@
|
||||
// Copyright 2025 Stefan Kerkmann (@karlk90)
|
||||
// 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
|
||||
#define HAL_USE_SPI TRUE
|
||||
|
||||
#include_next <halconf.h>
|
||||
20
keyboards/handwired/onekey/weact_g0b1cb/keyboard.json
Normal file
20
keyboards/handwired/onekey/weact_g0b1cb/keyboard.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"keyboard_name": "Onekey WeAct G0B1CB",
|
||||
"processor": "STM32G0B1",
|
||||
"bootloader": "stm32-dfu",
|
||||
"matrix_pins": {
|
||||
"cols": ["B4"],
|
||||
"rows": ["B5"]
|
||||
},
|
||||
"backlight": {
|
||||
"pin": "C6"
|
||||
},
|
||||
"ws2812": {
|
||||
"driver": "pwm",
|
||||
"pin": "B0"
|
||||
},
|
||||
"apa102": {
|
||||
"data_pin": "B15",
|
||||
"clock_pin": "B13"
|
||||
}
|
||||
}
|
||||
18
keyboards/handwired/onekey/weact_g0b1cb/mcuconf.h
Normal file
18
keyboards/handwired/onekey/weact_g0b1cb/mcuconf.h
Normal file
@@ -0,0 +1,18 @@
|
||||
// Copyright 2025 Stefan Kerkmann (@karlk90)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#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
|
||||
|
||||
#undef STM32_I2C_USE_I2C1
|
||||
#define STM32_I2C_USE_I2C1 TRUE
|
||||
|
||||
#undef STM32_SPI_USE_SPI2
|
||||
#define STM32_SPI_USE_SPI2 TRUE
|
||||
5
keyboards/handwired/onekey/weact_g0b1cb/readme.md
Normal file
5
keyboards/handwired/onekey/weact_g0b1cb/readme.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# WeAct Studio STM32G0B1CB onekey
|
||||
|
||||
Supported Hardware: <https://github.com/WeActStudio/WeActStudio.STM32G0B1CoreBoard>
|
||||
|
||||
To trigger keypress, short together pins *B4* and *B5*.
|
||||
Reference in New Issue
Block a user