aboutsummaryrefslogtreecommitdiff
path: root/drivers/haptic/solenoid.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/haptic/solenoid.h')
-rw-r--r--drivers/haptic/solenoid.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/drivers/haptic/solenoid.h b/drivers/haptic/solenoid.h
new file mode 100644
index 000000000..a08f62a11
--- /dev/null
+++ b/drivers/haptic/solenoid.h
@@ -0,0 +1,54 @@
1/* Copyright 2018 mtdjr - modified by ishtob
2 * Driver for solenoid 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
20#ifndef SOLENOID_DEFAULT_DWELL
21#define SOLENOID_DEFAULT_DWELL 12
22#endif
23
24#ifndef SOLENOID_MAX_DWELL
25#define SOLENOID_MAX_DWELL 100
26#endif
27
28#ifndef SOLENOID_MIN_DWELL
29#define SOLENOID_MIN_DWELL 4
30#endif
31
32#ifndef SOLENOID_ACTIVE
33#define SOLENOID_ACTIVE false
34#endif
35
36#ifndef SOLENOID_PIN
37#define SOLENOID_PIN F6
38#endif
39
40void solenoid_buzz_on(void);
41void solenoid_buzz_off(void);
42void solenoid_set_buzz(int buzz);
43
44void solenoid_dwell_minus(uint8_t solenoid_dwell);
45void solenoid_dwell_plus(uint8_t solenoid_dwell);
46void solenoid_set_dwell(uint8_t dwell);
47
48void solenoid_stop(void);
49void solenoid_fire(void);
50
51void solenoid_check(void);
52
53void solenoid_setup(void);
54void solenoid_shutdown(void);