From 0206bd9df31521fcfd764c3dd4cff383e4957151 Mon Sep 17 00:00:00 2001 From: dvermd <315743+dvermd@users.noreply.github.com> Date: Wed, 3 Aug 2022 10:31:37 +0200 Subject: add bluepill mcu to splittest (#16959) * add bluepill mcu to splittest * fix typo * refactoring * mcu config goes to mcuconf.h of keyboard * keymap specific config goes to keymap config.h * keyboard specific depending of keymap goes to post_config.h * Apply suggested change Co-authored-by: Ryan * Apply suggested change Co-authored-by: Ryan * Apply suggested change Co-authored-by: Ryan * Apply suggested change Co-authored-by: Ryan * Apply suggested change Co-authored-by: Ryan * splittest/bluepill: improve documentation Co-authored-by: Ryan --- keyboards/handwired/splittest/keymaps/bitbang/config.h | 18 ++++++++++++++++++ keyboards/handwired/splittest/keymaps/bitbang/keymap.c | 11 +++++++++++ keyboards/handwired/splittest/keymaps/bitbang/rules.mk | 1 + .../splittest/keymaps/serial_fullduplex/config.h | 8 ++++++++ .../splittest/keymaps/serial_fullduplex/halconf.h | 2 ++ .../splittest/keymaps/serial_fullduplex/keymap.c | 11 +++++++++++ .../splittest/keymaps/serial_fullduplex/rules.mk | 1 + .../splittest/keymaps/serial_halfduplex/config.h | 8 ++++++++ .../splittest/keymaps/serial_halfduplex/halconf.h | 2 ++ .../splittest/keymaps/serial_halfduplex/keymap.c | 11 +++++++++++ .../splittest/keymaps/serial_halfduplex/rules.mk | 1 + 11 files changed, 74 insertions(+) create mode 100644 keyboards/handwired/splittest/keymaps/bitbang/config.h create mode 100644 keyboards/handwired/splittest/keymaps/bitbang/keymap.c create mode 100644 keyboards/handwired/splittest/keymaps/bitbang/rules.mk create mode 100644 keyboards/handwired/splittest/keymaps/serial_fullduplex/config.h create mode 100644 keyboards/handwired/splittest/keymaps/serial_fullduplex/halconf.h create mode 100644 keyboards/handwired/splittest/keymaps/serial_fullduplex/keymap.c create mode 100644 keyboards/handwired/splittest/keymaps/serial_fullduplex/rules.mk create mode 100644 keyboards/handwired/splittest/keymaps/serial_halfduplex/config.h create mode 100644 keyboards/handwired/splittest/keymaps/serial_halfduplex/halconf.h create mode 100644 keyboards/handwired/splittest/keymaps/serial_halfduplex/keymap.c create mode 100644 keyboards/handwired/splittest/keymaps/serial_halfduplex/rules.mk (limited to 'keyboards/handwired/splittest/keymaps') diff --git a/keyboards/handwired/splittest/keymaps/bitbang/config.h b/keyboards/handwired/splittest/keymaps/bitbang/config.h new file mode 100644 index 0000000000..c21a363855 --- /dev/null +++ b/keyboards/handwired/splittest/keymaps/bitbang/config.h @@ -0,0 +1,18 @@ +// Copyright 2022 dvermd (@dvermd) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "config_common.h" + +#define SPLIT_BITBANG + +#define FORCED_SYNC_THROTTLE_MS 100 + +#define SELECT_SOFT_SERIAL_SPEED 3 // or 0, 1, 2, 4, 5 + // 0: about 189kbps (Experimental only) + // 1: about 137kbps (default) + // 2: about 75kbps + // 3: about 39kbps + // 4: about 26kbps + // 5: about 20kbps diff --git a/keyboards/handwired/splittest/keymaps/bitbang/keymap.c b/keyboards/handwired/splittest/keymaps/bitbang/keymap.c new file mode 100644 index 0000000000..9875000319 --- /dev/null +++ b/keyboards/handwired/splittest/keymaps/bitbang/keymap.c @@ -0,0 +1,11 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {[0] = LAYOUT(KC_L, KC_R)}; + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + debug_enable = true; + debug_matrix = true; + debug_keyboard = true; + // debug_mouse=true; +} \ No newline at end of file diff --git a/keyboards/handwired/splittest/keymaps/bitbang/rules.mk b/keyboards/handwired/splittest/keymaps/bitbang/rules.mk new file mode 100644 index 0000000000..a4f16a0b6b --- /dev/null +++ b/keyboards/handwired/splittest/keymaps/bitbang/rules.mk @@ -0,0 +1 @@ +SERIAL_DRIVER = bitbang diff --git a/keyboards/handwired/splittest/keymaps/serial_fullduplex/config.h b/keyboards/handwired/splittest/keymaps/serial_fullduplex/config.h new file mode 100644 index 0000000000..b83dc43a1f --- /dev/null +++ b/keyboards/handwired/splittest/keymaps/serial_fullduplex/config.h @@ -0,0 +1,8 @@ +// Copyright 2022 dvermd (@dvermd) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "config_common.h" + +#define SPLIT_SERIAL_FULLDUPLEX diff --git a/keyboards/handwired/splittest/keymaps/serial_fullduplex/halconf.h b/keyboards/handwired/splittest/keymaps/serial_fullduplex/halconf.h new file mode 100644 index 0000000000..35ae5bf214 --- /dev/null +++ b/keyboards/handwired/splittest/keymaps/serial_fullduplex/halconf.h @@ -0,0 +1,2 @@ +#define HAL_USE_SERIAL TRUE +#include_next diff --git a/keyboards/handwired/splittest/keymaps/serial_fullduplex/keymap.c b/keyboards/handwired/splittest/keymaps/serial_fullduplex/keymap.c new file mode 100644 index 0000000000..84919f53a7 --- /dev/null +++ b/keyboards/handwired/splittest/keymaps/serial_fullduplex/keymap.c @@ -0,0 +1,11 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {[0] = LAYOUT(KC_L, KC_R)}; + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + debug_enable = true; + debug_matrix = true; + debug_keyboard = true; + // debug_mouse=true; +} diff --git a/keyboards/handwired/splittest/keymaps/serial_fullduplex/rules.mk b/keyboards/handwired/splittest/keymaps/serial_fullduplex/rules.mk new file mode 100644 index 0000000000..c6e2988321 --- /dev/null +++ b/keyboards/handwired/splittest/keymaps/serial_fullduplex/rules.mk @@ -0,0 +1 @@ +SERIAL_DRIVER = usart diff --git a/keyboards/handwired/splittest/keymaps/serial_halfduplex/config.h b/keyboards/handwired/splittest/keymaps/serial_halfduplex/config.h new file mode 100644 index 0000000000..96dcf0dc42 --- /dev/null +++ b/keyboards/handwired/splittest/keymaps/serial_halfduplex/config.h @@ -0,0 +1,8 @@ +// Copyright 2022 dvermd (@dvermd) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "config_common.h" + +#define SPLIT_SERIAL_HALFDUPLEX diff --git a/keyboards/handwired/splittest/keymaps/serial_halfduplex/halconf.h b/keyboards/handwired/splittest/keymaps/serial_halfduplex/halconf.h new file mode 100644 index 0000000000..35ae5bf214 --- /dev/null +++ b/keyboards/handwired/splittest/keymaps/serial_halfduplex/halconf.h @@ -0,0 +1,2 @@ +#define HAL_USE_SERIAL TRUE +#include_next diff --git a/keyboards/handwired/splittest/keymaps/serial_halfduplex/keymap.c b/keyboards/handwired/splittest/keymaps/serial_halfduplex/keymap.c new file mode 100644 index 0000000000..84919f53a7 --- /dev/null +++ b/keyboards/handwired/splittest/keymaps/serial_halfduplex/keymap.c @@ -0,0 +1,11 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {[0] = LAYOUT(KC_L, KC_R)}; + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + debug_enable = true; + debug_matrix = true; + debug_keyboard = true; + // debug_mouse=true; +} diff --git a/keyboards/handwired/splittest/keymaps/serial_halfduplex/rules.mk b/keyboards/handwired/splittest/keymaps/serial_halfduplex/rules.mk new file mode 100644 index 0000000000..c6e2988321 --- /dev/null +++ b/keyboards/handwired/splittest/keymaps/serial_halfduplex/rules.mk @@ -0,0 +1 @@ +SERIAL_DRIVER = usart -- cgit v1.2.3