From 54e78ad86f811ec1e428ca5e1c98c09aa0129445 Mon Sep 17 00:00:00 2001 From: Drashna Jael're Date: Sat, 30 Dec 2023 04:04:02 -0800 Subject: [PATCH] [Keyboard] Add handwired feather stm32f405 express board --- .../feather_stm32f405_express/config.h | 16 ++++++ .../feather_stm32f405_express.c | 7 +++ .../feather_stm32f405_express/halconf.h | 22 ++++++++ .../feather_stm32f405_express/info.json | 53 +++++++++++++++++++ .../keymaps/default/keymap.c | 24 +++++++++ .../feather_stm32f405_express/mcuconf.h | 22 ++++++++ .../feather_stm32f405_express/readme.md | 27 ++++++++++ .../feather_stm32f405_express/rules.mk | 5 ++ 8 files changed, 176 insertions(+) create mode 100644 keyboards/handwired/feather_stm32f405_express/config.h create mode 100644 keyboards/handwired/feather_stm32f405_express/feather_stm32f405_express.c create mode 100644 keyboards/handwired/feather_stm32f405_express/halconf.h create mode 100644 keyboards/handwired/feather_stm32f405_express/info.json create mode 100644 keyboards/handwired/feather_stm32f405_express/keymaps/default/keymap.c create mode 100644 keyboards/handwired/feather_stm32f405_express/mcuconf.h create mode 100644 keyboards/handwired/feather_stm32f405_express/readme.md create mode 100644 keyboards/handwired/feather_stm32f405_express/rules.mk diff --git a/keyboards/handwired/feather_stm32f405_express/config.h b/keyboards/handwired/feather_stm32f405_express/config.h new file mode 100644 index 0000000000..5e31c8c5fd --- /dev/null +++ b/keyboards/handwired/feather_stm32f405_express/config.h @@ -0,0 +1,16 @@ +// Copyright 2023 Drashna Jael're (@Drashna Jael're) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#define I2C1_CLOCK_SPEED 400000 +#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_16_9 + +#define WS2812_PIN C0 + +#define OLED_DISPLAY_128X128 +#define OLED_UPDATE_INTERVAL 100 + +#define DRV2605L_FB_ERM_LRA 0 +#define DRV2605L_GREETING DRV2605L_EFFECT_750_MS_ALERT_100 +#define DRV2605L_DEFAULT_MODE DRV2605L_EFFECT_BUZZ_1_100 diff --git a/keyboards/handwired/feather_stm32f405_express/feather_stm32f405_express.c b/keyboards/handwired/feather_stm32f405_express/feather_stm32f405_express.c new file mode 100644 index 0000000000..f010f4ea0f --- /dev/null +++ b/keyboards/handwired/feather_stm32f405_express/feather_stm32f405_express.c @@ -0,0 +1,7 @@ +#include "quantum.h" + +void keyboard_post_init_kb(void) { + setPinOutput(C1); + writePinLow(C1); + keyboard_post_init_user(); +} diff --git a/keyboards/handwired/feather_stm32f405_express/halconf.h b/keyboards/handwired/feather_stm32f405_express/halconf.h new file mode 100644 index 0000000000..6c46c850f7 --- /dev/null +++ b/keyboards/handwired/feather_stm32f405_express/halconf.h @@ -0,0 +1,22 @@ +/* Copyright 2021 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + + +#define HAL_USE_I2C TRUE + +#include_next diff --git a/keyboards/handwired/feather_stm32f405_express/info.json b/keyboards/handwired/feather_stm32f405_express/info.json new file mode 100644 index 0000000000..8650fdbc47 --- /dev/null +++ b/keyboards/handwired/feather_stm32f405_express/info.json @@ -0,0 +1,53 @@ +{ + "manufacturer": "Drashna Jael're", + "keyboard_name": "handwired/feature_stm32f405_express", + "maintainer": "Drashna Jael're", + "bootloader": "tinyuf2", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true + }, + "matrix_pins": { + "cols": [null, null, null, null], + "rows": [null, null, null, null] + }, + "processor": "STM32F405", + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x0000", + "vid": "0xFEED" + }, + "rgblight": { + "led_count": 1, + "pin": "C0", + "sleep": true + }, + "layouts": { + "LAYOUT_ortho_4x4": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 1], "x": 1, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [2, 0], "x": 0, "y": 2}, + {"matrix": [2, 1], "x": 1, "y": 2}, + {"matrix": [2, 2], "x": 2, "y": 2}, + {"matrix": [2, 3], "x": 3, "y": 2}, + {"matrix": [3, 0], "x": 0, "y": 3}, + {"matrix": [3, 1], "x": 1, "y": 3}, + {"matrix": [3, 2], "x": 2, "y": 3}, + {"matrix": [3, 3], "x": 3, "y": 3} + ] + } + } +} diff --git a/keyboards/handwired/feather_stm32f405_express/keymaps/default/keymap.c b/keyboards/handwired/feather_stm32f405_express/keymaps/default/keymap.c new file mode 100644 index 0000000000..53ae7925cd --- /dev/null +++ b/keyboards/handwired/feather_stm32f405_express/keymaps/default/keymap.c @@ -0,0 +1,24 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * ┌───┬───┬───┬───┐ + * │ 7 │ 8 │ 9 │ / │ + * ├───┼───┼───┼───┤ + * │ 4 │ 5 │ 6 │ * │ + * ├───┼───┼───┼───┤ + * │ 1 │ 2 │ 3 │ - │ + * ├───┼───┼───┼───┤ + * │ 0 │ . │Ent│ + │ + * └───┴───┴───┴───┘ + */ + [0] = LAYOUT_ortho_4x4( + KC_P7, KC_P8, KC_P9, KC_PSLS, + KC_P4, KC_P5, KC_P6, KC_PAST, + KC_P1, KC_P2, KC_P3, KC_PMNS, + KC_P0, KC_PDOT, KC_PENT, KC_PPLS + ) +}; diff --git a/keyboards/handwired/feather_stm32f405_express/mcuconf.h b/keyboards/handwired/feather_stm32f405_express/mcuconf.h new file mode 100644 index 0000000000..87291c61a5 --- /dev/null +++ b/keyboards/handwired/feather_stm32f405_express/mcuconf.h @@ -0,0 +1,22 @@ +/* Copyright 2021 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include_next + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE diff --git a/keyboards/handwired/feather_stm32f405_express/readme.md b/keyboards/handwired/feather_stm32f405_express/readme.md new file mode 100644 index 0000000000..7b117e027c --- /dev/null +++ b/keyboards/handwired/feather_stm32f405_express/readme.md @@ -0,0 +1,27 @@ +# handwired/feature_stm32f405_express + +![handwired/feature_stm32f405_express](imgur.com image replace me!) + +*A short description of the keyboard/project* + +* Keyboard Maintainer: [Drashna Jael're](https://github.com/Drashna Jael're) +* Hardware Supported: *The PCBs, controllers supported* +* Hardware Availability: *Links to where you can find this hardware* + +Make example for this keyboard (after setting up your build environment): + + make handwired/feature_stm32f405_express:default + +Flashing example for this keyboard: + + make handwired/feature_stm32f405_express:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/handwired/feather_stm32f405_express/rules.mk b/keyboards/handwired/feather_stm32f405_express/rules.mk new file mode 100644 index 0000000000..bc6230136b --- /dev/null +++ b/keyboards/handwired/feather_stm32f405_express/rules.mk @@ -0,0 +1,5 @@ +# This file intentionally left blank +OLED_ENABLE = yes +HAPTIC_ENABLE = yes +HAPTIC_DRIVER = drv2605l +CONSOLE_ENABLE = yes