aboutsummaryrefslogtreecommitdiff
path: root/drivers/haptic/haptic.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/haptic/haptic.h')
-rw-r--r--drivers/haptic/haptic.h81
1 files changed, 0 insertions, 81 deletions
diff --git a/drivers/haptic/haptic.h b/drivers/haptic/haptic.h
deleted file mode 100644
index ba8e0d20b..000000000
--- a/drivers/haptic/haptic.h
+++ /dev/null
@@ -1,81 +0,0 @@
1/* Copyright 2019 ishtob
2 * Driver for haptic feedback written for QMK
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#pragma once
19#include <stdint.h>
20#include <stdbool.h>
21#include "quantum.h"
22#ifdef DRV2605L
23# include "DRV2605L.h"
24#endif
25
26#ifndef HAPTIC_FEEDBACK_DEFAULT
27# define HAPTIC_FEEDBACK_DEFAULT 0
28#endif
29#ifndef HAPTIC_MODE_DEFAULT
30# define HAPTIC_MODE_DEFAULT DRV_MODE_DEFAULT
31#endif
32
33/* EEPROM config settings */
34typedef union {
35 uint32_t raw;
36 struct {
37 bool enable : 1;
38 uint8_t feedback : 2;
39 uint8_t mode : 7;
40 bool buzz : 1;
41 uint8_t dwell : 7;
42 bool cont : 1;
43 uint8_t amplitude : 8;
44 uint8_t reserved : 5;
45 };
46} haptic_config_t;
47
48typedef enum HAPTIC_FEEDBACK {
49 KEY_PRESS,
50 KEY_PRESS_RELEASE,
51 KEY_RELEASE,
52 HAPTIC_FEEDBACK_MAX,
53} HAPTIC_FEEDBACK;
54
55bool process_haptic(uint16_t keycode, keyrecord_t *record);
56void haptic_init(void);
57void haptic_task(void);
58void eeconfig_debug_haptic(void);
59void haptic_enable(void);
60void haptic_disable(void);
61void haptic_toggle(void);
62void haptic_feedback_toggle(void);
63void haptic_mode_increase(void);
64void haptic_mode_decrease(void);
65void haptic_mode(uint8_t mode);
66void haptic_reset(void);
67void haptic_set_feedback(uint8_t feedback);
68void haptic_set_mode(uint8_t mode);
69void haptic_set_dwell(uint8_t dwell);
70void haptic_set_buzz(uint8_t buzz);
71void haptic_buzz_toggle(void);
72uint8_t haptic_get_mode(void);
73uint8_t haptic_get_feedback(void);
74void haptic_dwell_increase(void);
75void haptic_dwell_decrease(void);
76void haptic_toggle_continuous(void);
77void haptic_cont_increase(void);
78void haptic_cont_decrease(void);
79
80void haptic_play(void);
81void haptic_shutdown(void);