summaryrefslogtreecommitdiff
path: root/keyboards/buzzard/keymaps/crehmann/features
diff options
context:
space:
mode:
authorChristoph Rehmann <1273098+crehmann@users.noreply.github.com>2022-01-10 11:33:48 +0100
committerGitHub <noreply@github.com>2022-01-10 02:33:48 -0800
commit2e19d0d7d14fef69d583886c244d3c67b3c0cc3d (patch)
treee21ec0e671f1264e5a2c30ce650894cadc8374d8 /keyboards/buzzard/keymaps/crehmann/features
parentd7eb09949d426af891dd9cf85ad789285422490e (diff)
[Keyboard] Add Buzzard support (#15493)
* add buzzerd (untested, WIP) * configured linear actuator and fixed keymap * configuration tweaks and added custom keymap * add custom tapping term for home row mod * added readme * remove ionide folder * added scroll function to trackpoint * keymap reworked * using one shot shift and removed dynamic macros * reworked default keymap * adapted to latest qmk changes * remove caps word from default keymap * use provided coding guidelines * use get_highest_layer in favour of biton32 * fixed formatting * remove unnecessary define statement
Diffstat (limited to 'keyboards/buzzard/keymaps/crehmann/features')
-rw-r--r--keyboards/buzzard/keymaps/crehmann/features/haptic_utils.c42
-rw-r--r--keyboards/buzzard/keymaps/crehmann/features/haptic_utils.h10
2 files changed, 52 insertions, 0 deletions
diff --git a/keyboards/buzzard/keymaps/crehmann/features/haptic_utils.c b/keyboards/buzzard/keymaps/crehmann/features/haptic_utils.c
new file mode 100644
index 0000000000..37fa2902c5
--- /dev/null
+++ b/keyboards/buzzard/keymaps/crehmann/features/haptic_utils.c
@@ -0,0 +1,42 @@
+// Copyright 2021 Christoph Rehmann (crehmann)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "haptic_utils.h"
+
+#ifdef HAPTIC_ENABLE
+#include "drivers/haptic/DRV2605L.h"
+#endif
+
+#ifdef HAPTIC_ENABLE
+bool get_haptic_enabled_key(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case KC_BTN1 ... KC_BTN5:
+ return true;
+ break;
+ }
+
+ return false;
+}
+#endif
+
+void process_layer_pulse(layer_state_t state) {
+#ifdef HAPTIC_ENABLE
+ switch (get_highest_layer(state)) {
+ case 1:
+ DRV_pulse(soft_bump);
+ break;
+ case 2:
+ DRV_pulse(sh_dblsharp_tick);
+ break;
+ case 3:
+ DRV_pulse(lg_dblclick_str);
+ break;
+ case 4:
+ DRV_pulse(soft_bump);
+ break;
+ case 5:
+ DRV_pulse(pulsing_sharp);
+ break;
+ }
+#endif
+}
diff --git a/keyboards/buzzard/keymaps/crehmann/features/haptic_utils.h b/keyboards/buzzard/keymaps/crehmann/features/haptic_utils.h
new file mode 100644
index 0000000000..ccfbb7e14b
--- /dev/null
+++ b/keyboards/buzzard/keymaps/crehmann/features/haptic_utils.h
@@ -0,0 +1,10 @@
+// Copyright 2021 Christoph Rehmann (crehmann)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include QMK_KEYBOARD_H
+
+bool get_haptic_enabled_key(uint16_t keycode, keyrecord_t *record);
+
+void process_layer_pulse(layer_state_t state); \ No newline at end of file