From fca71f8d3173e2e5d54ff58688b01d4a72df3613 Mon Sep 17 00:00:00 2001 From: Stefan Kerkmann Date: Fri, 28 Jul 2023 01:19:53 +0200 Subject: [Keyboard] Add STM32f3 Discovery onekey (#21625) --- keyboards/handwired/onekey/stm32f3_disco/config.h | 6 ++++++ keyboards/handwired/onekey/stm32f3_disco/halconf.h | 8 ++++++++ keyboards/handwired/onekey/stm32f3_disco/info.json | 19 +++++++++++++++++++ keyboards/handwired/onekey/stm32f3_disco/mcuconf.h | 9 +++++++++ keyboards/handwired/onekey/stm32f3_disco/readme.md | 5 +++++ keyboards/handwired/onekey/stm32f3_disco/rules.mk | 0 6 files changed, 47 insertions(+) create mode 100644 keyboards/handwired/onekey/stm32f3_disco/config.h create mode 100644 keyboards/handwired/onekey/stm32f3_disco/halconf.h create mode 100644 keyboards/handwired/onekey/stm32f3_disco/info.json create mode 100644 keyboards/handwired/onekey/stm32f3_disco/mcuconf.h create mode 100644 keyboards/handwired/onekey/stm32f3_disco/readme.md create mode 100644 keyboards/handwired/onekey/stm32f3_disco/rules.mk (limited to 'keyboards/handwired/onekey/stm32f3_disco') diff --git a/keyboards/handwired/onekey/stm32f3_disco/config.h b/keyboards/handwired/onekey/stm32f3_disco/config.h new file mode 100644 index 0000000000..a0e3c54ec1 --- /dev/null +++ b/keyboards/handwired/onekey/stm32f3_disco/config.h @@ -0,0 +1,6 @@ +// Copyright 2023 Stefan Kerkmann +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define ADC_PIN A0 diff --git a/keyboards/handwired/onekey/stm32f3_disco/halconf.h b/keyboards/handwired/onekey/stm32f3_disco/halconf.h new file mode 100644 index 0000000000..e9d7ece8fc --- /dev/null +++ b/keyboards/handwired/onekey/stm32f3_disco/halconf.h @@ -0,0 +1,8 @@ +// Copyright 2023 Stefan Kerkmann +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define HAL_USE_ADC TRUE + +#include_next diff --git a/keyboards/handwired/onekey/stm32f3_disco/info.json b/keyboards/handwired/onekey/stm32f3_disco/info.json new file mode 100644 index 0000000000..b541cd8ae4 --- /dev/null +++ b/keyboards/handwired/onekey/stm32f3_disco/info.json @@ -0,0 +1,19 @@ +{ + "keyboard_name": "Onekey STM32F3 Discovery", + "processor": "STM32F303", + "bootloader": "stm32-dfu", + "matrix_pins": { + "cols": ["B4"], + "rows": ["B5"] + }, + "backlight": { + "pin": "E8" + }, + "ws2812": { + "pin": "A0" + }, + "apa102": { + "data_pin": "A0", + "clock_pin": "B13" + } +} diff --git a/keyboards/handwired/onekey/stm32f3_disco/mcuconf.h b/keyboards/handwired/onekey/stm32f3_disco/mcuconf.h new file mode 100644 index 0000000000..9172860b0f --- /dev/null +++ b/keyboards/handwired/onekey/stm32f3_disco/mcuconf.h @@ -0,0 +1,9 @@ +// Copyright 2023 Stefan Kerkmann +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include_next + +#undef STM32_ADC_USE_ADC1 +#define STM32_ADC_USE_ADC1 TRUE diff --git a/keyboards/handwired/onekey/stm32f3_disco/readme.md b/keyboards/handwired/onekey/stm32f3_disco/readme.md new file mode 100644 index 0000000000..ff5c061184 --- /dev/null +++ b/keyboards/handwired/onekey/stm32f3_disco/readme.md @@ -0,0 +1,5 @@ +# STM32F303 Discovery kit onekey + +* Supported Hardware: [STM32F303 Discovery](https://www.st.com/en/evaluation-tools/stm32f3discovery.html) + +To trigger keypress, short together pins *B4* and *B5*. diff --git a/keyboards/handwired/onekey/stm32f3_disco/rules.mk b/keyboards/handwired/onekey/stm32f3_disco/rules.mk new file mode 100644 index 0000000000..e69de29bb2 -- cgit v1.2.3