[Keyboard] Add Weact f446re board to one-keys
This commit is contained in:
parent
37f2e8cdbc
commit
c73f4970b3
6 changed files with 73 additions and 0 deletions
8
keyboards/handwired/onekey/weact_f446re/board.h
Normal file
8
keyboards/handwired/onekey/weact_f446re/board.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
// Copyright 2023 Nick Brassel (@tzarc)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#pragma once
|
||||
|
||||
#include_next <board.h>
|
||||
|
||||
#undef STM32_HSECLK
|
||||
#define STM32_HSECLK 8000000U
|
8
keyboards/handwired/onekey/weact_f446re/config.h
Normal file
8
keyboards/handwired/onekey/weact_f446re/config.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
// Copyright 2021 Nick Brassel (@tzarc)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#pragma once
|
||||
|
||||
#define ADC_PIN A0
|
||||
|
||||
#define SOLENOID_PINS { B12, B13, B14, B15 }
|
||||
#define SOLENOID_PINS_ACTIVE_STATE { high, high, low }
|
10
keyboards/handwired/onekey/weact_f446re/halconf.h
Normal file
10
keyboards/handwired/onekey/weact_f446re/halconf.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
// Copyright 2023 Nick Brassel (@tzarc)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#pragma once
|
||||
|
||||
#define HAL_USE_ADC TRUE
|
||||
#define HAL_USE_SPI TRUE
|
||||
#define HAL_USE_I2C TRUE
|
||||
#define HAL_USE_PWM TRUE
|
||||
|
||||
#include_next <halconf.h>
|
19
keyboards/handwired/onekey/weact_f446re/keyboard.json
Normal file
19
keyboards/handwired/onekey/weact_f446re/keyboard.json
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"keyboard_name": "Onekey Nucleo F446RE",
|
||||
"processor": "STM32F446",
|
||||
"bootloader": "stm32-dfu",
|
||||
"matrix_pins": {
|
||||
"cols": ["A2"],
|
||||
"rows": ["A1"]
|
||||
},
|
||||
"backlight": {
|
||||
"pin": "B8"
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "A0"
|
||||
},
|
||||
"apa102": {
|
||||
"data_pin": "A0",
|
||||
"clock_pin": "B13"
|
||||
}
|
||||
}
|
23
keyboards/handwired/onekey/weact_f446re/mcuconf.h
Normal file
23
keyboards/handwired/onekey/weact_f446re/mcuconf.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
// Copyright 2023 Nick Brassel (@tzarc)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
#pragma once
|
||||
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#undef STM32_PLLM_VALUE
|
||||
#define STM32_PLLM_VALUE 4
|
||||
|
||||
#undef STM32_PLLSAIM_VALUE
|
||||
#define STM32_PLLSAIM_VALUE 4
|
||||
|
||||
#undef STM32_ADC_USE_ADC1
|
||||
#define STM32_ADC_USE_ADC1 TRUE
|
||||
|
||||
#undef STM32_PWM_USE_TIM4
|
||||
#define STM32_PWM_USE_TIM4 TRUE
|
||||
|
||||
#undef STM32_I2C_USE_I2C1
|
||||
#define STM32_I2C_USE_I2C1 TRUE
|
||||
|
||||
#undef STM32_SPI_USE_SPI1
|
||||
#define STM32_SPI_USE_SPI1 TRUE
|
5
keyboards/handwired/onekey/weact_f446re/readme.md
Normal file
5
keyboards/handwired/onekey/weact_f446re/readme.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
# STM32 Nucleo-L432 onekey
|
||||
|
||||
To trigger keypress, short together pins *A1* and *A2*.
|
||||
|
||||
You'll also need to connect `VIN`, `GND`, USB `D+` to `PA12`/`D2`, and USB `D-` to `PA11`/`D10`.
|
Loading…
Add table
Reference in a new issue