summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-08-04 10:16:16 +1000
committerGitHub <noreply@github.com>2023-08-04 01:16:16 +0100
commit0b802defd4ad81f38bdd3ae0192e2a834f7d99be (patch)
treef1577113e925225a25a89e2b02fbea74c65a0322
parentc9fa2006d95a68cf8da85e374b205c670260d78b (diff)
haptic: further naming cleanups (#21682)
-rw-r--r--docs/feature_haptic_feedback.md26
-rw-r--r--drivers/haptic/drv2605l.c94
-rw-r--r--drivers/haptic/drv2605l.h451
-rw-r--r--keyboards/boston_meetup/2019/config.h58
-rw-r--r--keyboards/buzzard/keymaps/crehmann/config.h4
-rw-r--r--keyboards/buzzard/keymaps/crehmann/features/haptic_utils.c10
-rw-r--r--keyboards/buzzard/keymaps/default/config.h4
-rw-r--r--keyboards/buzzard/rev1/rev1.c10
-rw-r--r--keyboards/hadron/ver3/config.h58
-rw-r--r--keyboards/handwired/swiftrax/bumblebee/keymaps/default/keymap.c10
-rw-r--r--keyboards/handwired/swiftrax/bumblebee/keymaps/via/keymap.c10
-rw-r--r--keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/config.h6
-rw-r--r--keyboards/hillside/46/0_1/config.h18
-rw-r--r--keyboards/hillside/48/0_1/config.h18
-rw-r--r--keyboards/hillside/52/0_1/config.h18
-rw-r--r--keyboards/pearlboards/atlas/config.h10
-rw-r--r--keyboards/pearlboards/pearl/config.h10
-rw-r--r--keyboards/pearlboards/zeus/config.h10
-rw-r--r--keyboards/splitkb/zima/config.h14
-rw-r--r--layouts/community/ortho_4x12/drashna/config.h58
-rw-r--r--quantum/haptic.c4
21 files changed, 428 insertions, 473 deletions
diff --git a/docs/feature_haptic_feedback.md b/docs/feature_haptic_feedback.md
index 02a231138d..68145edd6c 100644
--- a/docs/feature_haptic_feedback.md
+++ b/docs/feature_haptic_feedback.md
@@ -94,29 +94,29 @@ This driver supports 2 different feedback motors. Set the following in your `con
94Eccentric Rotating Mass vibration motors (ERM) is motor with a off-set weight attached so when drive signal is attached, the off-set weight spins and causes a sinusoidal wave that translate into vibrations. 94Eccentric Rotating Mass vibration motors (ERM) is motor with a off-set weight attached so when drive signal is attached, the off-set weight spins and causes a sinusoidal wave that translate into vibrations.
95 95
96```c 96```c
97#define FB_ERM_LRA 0 97#define DRV2605L_FB_ERM_LRA 0
98#define FB_BRAKEFACTOR 3 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */ 98#define DRV2605L_FB_BRAKEFACTOR 3 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */
99#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ 99#define DRV2605L_FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */
100 100
101/* Please refer to your datasheet for the optimal setting for your specific motor. */ 101/* Please refer to your datasheet for the optimal setting for your specific motor. */
102#define RATED_VOLTAGE 3 102#define DRV2605L_RATED_VOLTAGE 3
103#define V_PEAK 5 103#define DRV2605L_V_PEAK 5
104``` 104```
105##### LRA 105##### LRA
106 106
107Linear resonant actuators (LRA, also know as a linear vibrator) works different from a ERM. A LRA has a weight and magnet suspended by springs and a voice coil. When the drive signal is applied, the weight would be vibrate on a single axis (side to side or up and down). Since the weight is attached to a spring, there is a resonance effect at a specific frequency. This frequency is where the LRA will operate the most efficiently. Refer to the motor's datasheet for the recommanded range for this frequency. 107Linear resonant actuators (LRA, also know as a linear vibrator) works different from a ERM. A LRA has a weight and magnet suspended by springs and a voice coil. When the drive signal is applied, the weight would be vibrate on a single axis (side to side or up and down). Since the weight is attached to a spring, there is a resonance effect at a specific frequency. This frequency is where the LRA will operate the most efficiently. Refer to the motor's datasheet for the recommanded range for this frequency.
108 108
109```c 109```c
110#define FB_ERM_LRA 1 110#define DRV2605L_FB_ERM_LRA 1
111#define FB_BRAKEFACTOR 3 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */ 111#define DRV2605L_FB_BRAKEFACTOR 3 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */
112#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ 112#define DRV2605L_FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */
113 113
114/* Please refer to your datasheet for the optimal setting for your specific motor. */ 114/* Please refer to your datasheet for the optimal setting for your specific motor. */
115#define RATED_VOLTAGE 2 115#define DRV2605L_RATED_VOLTAGE 2
116#define V_PEAK 2.8 116#define DRV2605L_V_PEAK 2.8
117#define V_RMS 2.0 117#define DRV2605L_V_RMS 2.0
118#define V_PEAK 2.1 118#define DRV2605L_V_PEAK 2.1
119#define F_LRA 205 /* resonance freq */ 119#define DRV2605L_F_LRA 205 /* resonance freq */
120``` 120```
121 121
122#### DRV2605L waveform library 122#### DRV2605L waveform library
diff --git a/drivers/haptic/drv2605l.c b/drivers/haptic/drv2605l.c
index 7613dc59d1..1ad2ad385f 100644
--- a/drivers/haptic/drv2605l.c
+++ b/drivers/haptic/drv2605l.c
@@ -41,58 +41,58 @@ void drv2605l_init(void) {
41 41
42 // drv2605l_write(DRV2605L_REG_FEEDBACK_CTRL,0xB6); 42 // drv2605l_write(DRV2605L_REG_FEEDBACK_CTRL,0xB6);
43 43
44#if FB_ERM_LRA == 0 44#if DRV2605L_FB_ERM_LRA == 0
45 /* ERM settings */ 45 /* ERM settings */
46 drv2605l_write(DRV2605L_REG_RATED_VOLTAGE, (RATED_VOLTAGE / 21.33) * 1000); 46 drv2605l_write(DRV2605L_REG_RATED_VOLTAGE, (DRV2605L_RATED_VOLTAGE / 21.33) * 1000);
47# if ERM_OPEN_LOOP == 0 47# if DRV2605L_ERM_OPEN_LOOP == 0
48 drv2605l_write(DRV2605L_REG_OVERDRIVE_CLAMP_VOLTAGE, (((V_PEAK * (DRIVE_TIME + BLANKING_TIME + IDISS_TIME)) / 0.02133) / (DRIVE_TIME - 0.0003))); 48 drv2605l_write(DRV2605L_REG_OVERDRIVE_CLAMP_VOLTAGE, (((DRV2605L_V_PEAK * (DRV2605L_DRIVE_TIME + DRV2605L_BLANKING_TIME + DRV2605L_IDISS_TIME)) / 0.02133) / (DRV2605L_DRIVE_TIME - 0.0003)));
49# elif ERM_OPEN_LOOP == 1 49# elif DRV2605L_ERM_OPEN_LOOP == 1
50 drv2605l_write(DRV2605L_REG_OVERDRIVE_CLAMP_VOLTAGE, (V_PEAK / 0.02196)); 50 drv2605l_write(DRV2605L_REG_OVERDRIVE_CLAMP_VOLTAGE, (DRV2605L_V_PEAK / 0.02196));
51# endif 51# endif
52#elif FB_ERM_LRA == 1 52#elif DRV2605L_FB_ERM_LRA == 1
53 drv2605l_write(DRV2605L_REG_RATED_VOLTAGE, ((V_RMS * sqrt(1 - ((4 * ((150 + (SAMPLE_TIME * 50)) * 0.000001)) + 0.0003) * F_LRA) / 0.02071))); 53 drv2605l_write(DRV2605L_REG_RATED_VOLTAGE, ((DRV2605L_V_RMS * sqrt(1 - ((4 * ((150 + (DRV2605L_SAMPLE_TIME * 50)) * 0.000001)) + 0.0003) * DRV2605L_F_LRA) / 0.02071)));
54# if LRA_OPEN_LOOP == 0 54# if DRV2605L_LRA_OPEN_LOOP == 0
55 drv2605l_write(DRV2605L_REG_OVERDRIVE_CLAMP_VOLTAGE, ((V_PEAK / sqrt(1 - (F_LRA * 0.0008)) / 0.02133))); 55 drv2605l_write(DRV2605L_REG_OVERDRIVE_CLAMP_VOLTAGE, ((DRV2605L_V_PEAK / sqrt(1 - (DRV2605L_F_LRA * 0.0008)) / 0.02133)));
56# elif LRA_OPEN_LOOP == 1 56# elif DRV2605L_LRA_OPEN_LOOP == 1
57 drv2605l_write(DRV2605L_REG_OVERDRIVE_CLAMP_VOLTAGE, (V_PEAK / 0.02196)); 57 drv2605l_write(DRV2605L_REG_OVERDRIVE_CLAMP_VOLTAGE, (DRV2605L_V_PEAK / 0.02196));
58# endif 58# endif
59#endif 59#endif
60 60
61 DRVREG_FBR FB_SET; 61 drv2605l_reg_feedback_ctrl_t reg_feedback_ctrl;
62 FB_SET.Bits.ERM_LRA = FB_ERM_LRA; 62 reg_feedback_ctrl.bits.ERM_LRA = DRV2605L_FB_ERM_LRA;
63 FB_SET.Bits.BRAKE_FACTOR = FB_BRAKEFACTOR; 63 reg_feedback_ctrl.bits.BRAKE_FACTOR = DRV2605L_FB_BRAKEFACTOR;
64 FB_SET.Bits.LOOP_GAIN = FB_LOOPGAIN; 64 reg_feedback_ctrl.bits.LOOP_GAIN = DRV2605L_FB_LOOPGAIN;
65 FB_SET.Bits.BEMF_GAIN = 0; /* auto-calibration populates this field*/ 65 reg_feedback_ctrl.bits.BEMF_GAIN = 0; /* auto-calibration populates this field*/
66 drv2605l_write(DRV2605L_REG_FEEDBACK_CTRL, (uint8_t)FB_SET.Byte); 66 drv2605l_write(DRV2605L_REG_FEEDBACK_CTRL, (uint8_t)reg_feedback_ctrl.raw);
67 67
68 DRVREG_CTRL1 C1_SET; 68 drv2605l_reg_ctrl1_t reg_ctrl1;
69 C1_SET.Bits.C1_DRIVE_TIME = DRIVE_TIME; 69 reg_ctrl1.bits.C1_DRIVE_TIME = DRV2605L_DRIVE_TIME;
70 C1_SET.Bits.C1_AC_COUPLE = AC_COUPLE; 70 reg_ctrl1.bits.C1_AC_COUPLE = DRV2605L_AC_COUPLE;
71 C1_SET.Bits.C1_STARTUP_BOOST = STARTUP_BOOST; 71 reg_ctrl1.bits.C1_STARTUP_BOOST = DRV2605L_STARTUP_BOOST;
72 drv2605l_write(DRV2605L_REG_CTRL1, (uint8_t)C1_SET.Byte); 72 drv2605l_write(DRV2605L_REG_CTRL1, (uint8_t)reg_ctrl1.raw);
73 73
74 DRVREG_CTRL2 C2_SET; 74 drv2605l_reg_ctrl2_t reg_ctrl2;
75 C2_SET.Bits.C2_BIDIR_INPUT = BIDIR_INPUT; 75 reg_ctrl2.bits.C2_BIDIR_INPUT = DRV2605L_BIDIR_INPUT;
76 C2_SET.Bits.C2_BRAKE_STAB = BRAKE_STAB; 76 reg_ctrl2.bits.C2_BRAKE_STAB = DRV2605L_BRAKE_STAB;
77 C2_SET.Bits.C2_SAMPLE_TIME = SAMPLE_TIME; 77 reg_ctrl2.bits.C2_SAMPLE_TIME = DRV2605L_SAMPLE_TIME;
78 C2_SET.Bits.C2_BLANKING_TIME = BLANKING_TIME; 78 reg_ctrl2.bits.C2_BLANKING_TIME = DRV2605L_BLANKING_TIME;
79 C2_SET.Bits.C2_IDISS_TIME = IDISS_TIME; 79 reg_ctrl2.bits.C2_IDISS_TIME = DRV2605L_IDISS_TIME;
80 drv2605l_write(DRV2605L_REG_CTRL2, (uint8_t)C2_SET.Byte); 80 drv2605l_write(DRV2605L_REG_CTRL2, (uint8_t)reg_ctrl2.raw);
81 81
82 DRVREG_CTRL3 C3_SET; 82 drv2605l_reg_ctrl3_t reg_ctrl3;
83 C3_SET.Bits.C3_LRA_OPEN_LOOP = LRA_OPEN_LOOP; 83 reg_ctrl3.bits.C3_LRA_OPEN_LOOP = DRV2605L_LRA_OPEN_LOOP;
84 C3_SET.Bits.C3_N_PWM_ANALOG = N_PWM_ANALOG; 84 reg_ctrl3.bits.C3_N_PWM_ANALOG = DRV2605L_N_PWM_ANALOG;
85 C3_SET.Bits.C3_LRA_DRIVE_MODE = LRA_DRIVE_MODE; 85 reg_ctrl3.bits.C3_LRA_DRIVE_MODE = DRV2605L_LRA_DRIVE_MODE;
86 C3_SET.Bits.C3_DATA_FORMAT_RTO = DATA_FORMAT_RTO; 86 reg_ctrl3.bits.C3_DATA_FORMAT_RTO = DRV2605L_DATA_FORMAT_RTO;
87 C3_SET.Bits.C3_SUPPLY_COMP_DIS = SUPPLY_COMP_DIS; 87 reg_ctrl3.bits.C3_SUPPLY_COMP_DIS = DRV2605L_SUPPLY_COMP_DIS;
88 C3_SET.Bits.C3_ERM_OPEN_LOOP = ERM_OPEN_LOOP; 88 reg_ctrl3.bits.C3_ERM_OPEN_LOOP = DRV2605L_ERM_OPEN_LOOP;
89 C3_SET.Bits.C3_NG_THRESH = NG_THRESH; 89 reg_ctrl3.bits.C3_NG_THRESH = DRV2605L_NG_THRESH;
90 drv2605l_write(DRV2605L_REG_CTRL3, (uint8_t)C3_SET.Byte); 90 drv2605l_write(DRV2605L_REG_CTRL3, (uint8_t)reg_ctrl3.raw);
91 91
92 DRVREG_CTRL4 C4_SET; 92 drv2605l_reg_ctrl4_t reg_ctrl4;
93 C4_SET.Bits.C4_ZC_DET_TIME = ZC_DET_TIME; 93 reg_ctrl4.bits.C4_ZC_DET_TIME = DRV2605L_ZC_DET_TIME;
94 C4_SET.Bits.C4_AUTO_CAL_TIME = AUTO_CAL_TIME; 94 reg_ctrl4.bits.C4_AUTO_CAL_TIME = DRV2605L_AUTO_CAL_TIME;
95 drv2605l_write(DRV2605L_REG_CTRL4, (uint8_t)C4_SET.Byte); 95 drv2605l_write(DRV2605L_REG_CTRL4, (uint8_t)reg_ctrl4.raw);
96 96
97 drv2605l_write(DRV2605L_REG_LIBRARY_SELECTION, DRV2605L_LIBRARY); 97 drv2605l_write(DRV2605L_REG_LIBRARY_SELECTION, DRV2605L_LIBRARY);
98 98
diff --git a/drivers/haptic/drv2605l.h b/drivers/haptic/drv2605l.h
index 796611edb6..a7cf856a86 100644
--- a/drivers/haptic/drv2605l.h
+++ b/drivers/haptic/drv2605l.h
@@ -22,42 +22,42 @@
22/* Initialization settings 22/* Initialization settings
23 23
24 * Feedback Control Settings */ 24 * Feedback Control Settings */
25#ifndef FB_ERM_LRA 25#ifndef DRV2605L_FB_ERM_LRA
26# define FB_ERM_LRA 1 /* For ERM:0 or LRA:1*/ 26# define DRV2605L_FB_ERM_LRA 1 /* For ERM:0 or LRA:1*/
27#endif 27#endif
28#ifndef FB_BRAKEFACTOR 28#ifndef DRV2605L_FB_BRAKEFACTOR
29# define FB_BRAKEFACTOR 3 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */ 29# define DRV2605L_FB_BRAKEFACTOR 3 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */
30#endif 30#endif
31#ifndef FB_LOOPGAIN 31#ifndef DRV2605L_FB_LOOPGAIN
32# define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ 32# define DRV2605L_FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */
33#endif 33#endif
34 34
35/* LRA specific settings */ 35/* LRA specific settings */
36#if FB_ERM_LRA == 1 36#if DRV2605L_FB_ERM_LRA == 1
37# ifndef V_RMS 37# ifndef DRV2605L_V_RMS
38# define V_RMS 2.0 38# define DRV2605L_V_RMS 2.0
39# endif 39# endif
40# ifndef V_PEAK 40# ifndef DRV2605L_V_PEAK
41# define V_PEAK 2.1 41# define DRV2605L_V_PEAK 2.1
42# endif 42# endif
43# ifndef F_LRA 43# ifndef DRV2605L_F_LRA
44# define F_LRA 205 44# define DRV2605L_F_LRA 205
45# endif 45# endif
46# ifndef RATED_VOLTAGE 46# ifndef DRV2605L_RATED_VOLTAGE
47# define RATED_VOLTAGE 2 /* 2v as safe range in case device voltage is not set */ 47# define DRV2605L_RATED_VOLTAGE 2 /* 2v as safe range in case device voltage is not set */
48# endif 48# endif
49#endif 49#endif
50 50
51#ifndef RATED_VOLTAGE 51#ifndef DRV2605L_RATED_VOLTAGE
52# define RATED_VOLTAGE 2 /* 2v as safe range in case device voltage is not set */ 52# define DRV2605L_RATED_VOLTAGE 2 /* 2v as safe range in case device voltage is not set */
53#endif 53#endif
54#ifndef V_PEAK 54#ifndef DRV2605L_V_PEAK
55# define V_PEAK 2.8 55# define DRV2605L_V_PEAK 2.8
56#endif 56#endif
57 57
58/* Library Selection */ 58/* Library Selection */
59#ifndef DRV2605L_LIBRARY 59#ifndef DRV2605L_LIBRARY
60# if FB_ERM_LRA == 1 60# if DRV2605L_FB_ERM_LRA == 1
61# define DRV2605L_LIBRARY 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */ 61# define DRV2605L_LIBRARY 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
62# else 62# else
63# define DRV2605L_LIBRARY 1 63# define DRV2605L_LIBRARY 1
@@ -65,69 +65,69 @@
65#endif 65#endif
66 66
67#ifndef DRV2605L_GREETING 67#ifndef DRV2605L_GREETING
68# define DRV2605L_GREETING alert_750ms 68# define DRV2605L_GREETING DRV2605L_EFFECT_750_MS_ALERT_100
69#endif 69#endif
70#ifndef DRV2605L_DEFAULT_MODE 70#ifndef DRV2605L_DEFAULT_MODE
71# define DRV2605L_DEFAULT_MODE strong_click1 71# define DRV2605L_DEFAULT_MODE DRV2605L_EFFECT_STRONG_CLICK_1_100
72#endif 72#endif
73 73
74/* Control 1 register settings */ 74/* Control 1 register settings */
75#ifndef DRIVE_TIME 75#ifndef DRV2605L_DRIVE_TIME
76# define DRIVE_TIME 25 76# define DRV2605L_DRIVE_TIME 25
77#endif 77#endif
78#ifndef AC_COUPLE 78#ifndef DRV2605L_AC_COUPLE
79# define AC_COUPLE 0 79# define DRV2605L_AC_COUPLE 0
80#endif 80#endif
81#ifndef STARTUP_BOOST 81#ifndef DRV2605L_STARTUP_BOOST
82# define STARTUP_BOOST 1 82# define DRV2605L_STARTUP_BOOST 1
83#endif 83#endif
84 84
85/* Control 2 Settings */ 85/* Control 2 Settings */
86#ifndef BIDIR_INPUT 86#ifndef DRV2605L_BIDIR_INPUT
87# define BIDIR_INPUT 1 87# define DRV2605L_BIDIR_INPUT 1
88#endif 88#endif
89#ifndef BRAKE_STAB 89#ifndef DRV2605L_BRAKE_STAB
90# define BRAKE_STAB 1 /* Loopgain is reduced when braking is almost complete to improve stability */ 90# define DRV2605L_BRAKE_STAB 1 /* Loopgain is reduced when braking is almost complete to improve stability */
91#endif 91#endif
92#ifndef SAMPLE_TIME 92#ifndef DRV2605L_SAMPLE_TIME
93# define SAMPLE_TIME 3 93# define DRV2605L_SAMPLE_TIME 3
94#endif 94#endif
95#ifndef BLANKING_TIME 95#ifndef DRV2605L_BLANKING_TIME
96# define BLANKING_TIME 1 96# define DRV2605L_BLANKING_TIME 1
97#endif 97#endif
98#ifndef IDISS_TIME 98#ifndef DRV2605L_IDISS_TIME
99# define IDISS_TIME 1 99# define DRV2605L_IDISS_TIME 1
100#endif 100#endif
101 101
102/* Control 3 settings */ 102/* Control 3 settings */
103#ifndef NG_THRESH 103#ifndef DRV2605L_NG_THRESH
104# define NG_THRESH 2 104# define DRV2605L_NG_THRESH 2
105#endif 105#endif
106#ifndef ERM_OPEN_LOOP 106#ifndef DRV2605L_ERM_OPEN_LOOP
107# define ERM_OPEN_LOOP 1 107# define DRV2605L_ERM_OPEN_LOOP 1
108#endif 108#endif
109#ifndef SUPPLY_COMP_DIS 109#ifndef DRV2605L_SUPPLY_COMP_DIS
110# define SUPPLY_COMP_DIS 0 110# define DRV2605L_SUPPLY_COMP_DIS 0
111#endif 111#endif
112#ifndef DATA_FORMAT_RTO 112#ifndef DRV2605L_DATA_FORMAT_RTO
113# define DATA_FORMAT_RTO 0 113# define DRV2605L_DATA_FORMAT_RTO 0
114#endif 114#endif
115#ifndef LRA_DRIVE_MODE 115#ifndef DRV2605L_LRA_DRIVE_MODE
116# define LRA_DRIVE_MODE 0 116# define DRV2605L_LRA_DRIVE_MODE 0
117#endif 117#endif
118#ifndef N_PWM_ANALOG 118#ifndef DRV2605L_N_PWM_ANALOG
119# define N_PWM_ANALOG 0 119# define DRV2605L_N_PWM_ANALOG 0
120#endif 120#endif
121#ifndef LRA_OPEN_LOOP 121#ifndef DRV2605L_LRA_OPEN_LOOP
122# define LRA_OPEN_LOOP 0 122# define DRV2605L_LRA_OPEN_LOOP 0
123#endif 123#endif
124 124
125/* Control 4 settings */ 125/* Control 4 settings */
126#ifndef ZC_DET_TIME 126#ifndef DRV2605L_ZC_DET_TIME
127# define ZC_DET_TIME 0 127# define DRV2605L_ZC_DET_TIME 0
128#endif 128#endif
129#ifndef AUTO_CAL_TIME 129#ifndef DRV2605L_AUTO_CAL_TIME
130# define AUTO_CAL_TIME 3 130# define DRV2605L_AUTO_CAL_TIME 3
131#endif 131#endif
132 132
133#define DRV2605L_I2C_ADDRESS 0x5A 133#define DRV2605L_I2C_ADDRESS 0x5A
@@ -175,203 +175,169 @@ void drv2605l_rtp_init(void);
175void drv2605l_amplitude(const uint8_t amplitude); 175void drv2605l_amplitude(const uint8_t amplitude);
176void drv2605l_pulse(const uint8_t sequence); 176void drv2605l_pulse(const uint8_t sequence);
177 177
178typedef enum DRV_EFFECT { 178typedef enum drv2605l_effect_t {
179 clear_sequence, 179 DRV2605L_EFFECT_CLEAR_SEQUENCE,
180 strong_click, 180 DRV2605L_EFFECT_STRONG_CLICK_100,
181 strong_click_60, 181 DRV2605L_EFFECT_STRONG_CLICK_60,
182 strong_click_30, 182 DRV2605L_EFFECT_STRONG_CLICK_30,
183 sharp_click, 183 DRV2605L_EFFECT_SHARP_CLICK_100,
184 sharp_click_60, 184 DRV2605L_EFFECT_SHARP_CLICK_60,
185 sharp_click_30, 185 DRV2605L_EFFECT_SHARP_CLICK_30,
186 soft_bump, 186 DRV2605L_EFFECT_SOFT_BUMP_100,
187 soft_bump_60, 187 DRV2605L_EFFECT_SOFT_BUMP_60,
188 soft_bump_30, 188 DRV2605L_EFFECT_SOFT_BUMP_30,
189 dbl_click, 189 DRV2605L_EFFECT_DOUBLE_CLICK_100,
190 dbl_click_60, 190 DRV2605L_EFFECT_DOUBLE_CLICK_60,
191 trp_click, 191 DRV2605L_EFFECT_TRIPLE_CLICK_100,
192 soft_fuzz, 192 DRV2605L_EFFECT_SOFT_FUZZ_60,
193 strong_buzz, 193 DRV2605L_EFFECT_STRONG_BUZZ_100,
194 alert_750ms, 194 DRV2605L_EFFECT_750_MS_ALERT_100,
195 alert_1000ms, 195 DRV2605L_EFFECT_1000_MS_ALERT_100,
196 strong_click1, 196 DRV2605L_EFFECT_STRONG_CLICK_1_100,
197 strong_click2_80, 197 DRV2605L_EFFECT_STRONG_CLICK_2_80,
198 strong_click3_60, 198 DRV2605L_EFFECT_STRONG_CLICK_3_60,
199 strong_click4_30, 199 DRV2605L_EFFECT_STRONG_CLICK_4_30,
200 medium_click1, 200 DRV2605L_EFFECT_MEDIUM_CLICK_1_100,
201 medium_click2_80, 201 DRV2605L_EFFECT_MEDIUM_CLICK_2_80,
202 medium_click3_60, 202 DRV2605L_EFFECT_MEDIUM_CLICK_3_60,
203 sharp_tick1, 203 DRV2605L_EFFECT_SHARP_TICK_1_100,
204 sharp_tick2_80, 204 DRV2605L_EFFECT_SHARP_TICK_2_80,
205 sharp_tick3_60, 205 DRV2605L_EFFECT_SHARP_TICK_3_60,
206 sh_dblclick_str, 206 DRV2605L_EFFECT_SHORT_DOUBLE_CLICK_STRONG_1_100,
207 sh_dblclick_str_80, 207 DRV2605L_EFFECT_SHORT_DOUBLE_CLICK_STRONG_2_80,
208 sh_dblclick_str_60, 208 DRV2605L_EFFECT_SHORT_DOUBLE_CLICK_STRONG_3_60,
209 sh_dblclick_str_30, 209 DRV2605L_EFFECT_SHORT_DOUBLE_CLICK_STRONG_4_30,
210 sh_dblclick_med, 210 DRV2605L_EFFECT_SHORT_DOUBLE_CLICK_MEDIUM_1_100,
211 sh_dblclick_med_80, 211 DRV2605L_EFFECT_SHORT_DOUBLE_CLICK_MEDIUM_2_80,
212 sh_dblclick_med_60, 212 DRV2605L_EFFECT_SHORT_DOUBLE_CLICK_MEDIUM_3_60,
213 sh_dblsharp_tick, 213 DRV2605L_EFFECT_SHORT_DOUBLE_SHARP_TICK_1_100,
214 sh_dblsharp_tick_80, 214 DRV2605L_EFFECT_SHORT_DOUBLE_SHARP_TICK_2_80,
215 sh_dblsharp_tick_60, 215 DRV2605L_EFFECT_SHORT_DOUBLE_SHARP_TICK_3_60,
216 lg_dblclick_str, 216 DRV2605L_EFFECT_LONG_DOUBLE_SHARP_CLICK_STRONG_1_100,
217 lg_dblclick_str_80, 217 DRV2605L_EFFECT_LONG_DOUBLE_SHARP_CLICK_STRONG_2_80,
218 lg_dblclick_str_60, 218 DRV2605L_EFFECT_LONG_DOUBLE_SHARP_CLICK_STRONG_3_60,
219 lg_dblclick_str_30, 219 DRV2605L_EFFECT_LONG_DOUBLE_SHARP_CLICK_STRONG_4_30,
220 lg_dblclick_med, 220 DRV2605L_EFFECT_LONG_DOUBLE_SHARP_CLICK_MEDIUM_1_100,
221 lg_dblclick_med_80, 221 DRV2605L_EFFECT_LONG_DOUBLE_SHARP_CLICK_MEDIUM_2_80,
222 lg_dblclick_med_60, 222 DRV2605L_EFFECT_LONG_DOUBLE_SHARP_CLICK_MEDIUM_3_60,
223 lg_dblsharp_tick, 223 DRV2605L_EFFECT_LONG_DOUBLE_SHARP_TICK_1_100,
224 lg_dblsharp_tick_80, 224 DRV2605L_EFFECT_LONG_DOUBLE_SHARP_TICK_2_80,
225 lg_dblsharp_tick_60, 225 DRV2605L_EFFECT_LONG_DOUBLE_SHARP_TICK_3_60,
226 buzz, 226 DRV2605L_EFFECT_BUZZ_1_100,
227 buzz_80, 227 DRV2605L_EFFECT_BUZZ_2_80,
228 buzz_60, 228 DRV2605L_EFFECT_BUZZ_3_60,
229 buzz_40, 229 DRV2605L_EFFECT_BUZZ_4_40,
230 buzz_20, 230 DRV2605L_EFFECT_BUZZ_5_20,
231 pulsing_strong, 231 DRV2605L_EFFECT_PULSING_STRONG_1_100,
232 pulsing_strong_80, 232 DRV2605L_EFFECT_PULSING_STRONG_2_60,
233 pulsing_medium, 233 DRV2605L_EFFECT_PULSING_MEDIUM_1_100,
234 pulsing_medium_80, 234 DRV2605L_EFFECT_PULSING_MEDIUM_2_60,
235 pulsing_sharp, 235 DRV2605L_EFFECT_PULSING_SHARP_1_100,
236 pulsing_sharp_80, 236 DRV2605L_EFFECT_PULSING_SHARP_2_60,
237 transition_click, 237 DRV2605L_EFFECT_TRANSITION_CLICK_1_100,
238 transition_click_80, 238 DRV2605L_EFFECT_TRANSITION_CLICK_2_80,
239 transition_click_60, 239 DRV2605L_EFFECT_TRANSITION_CLICK_3_60,
240 transition_click_40, 240 DRV2605L_EFFECT_TRANSITION_CLICK_4_40,
241 transition_click_20, 241 DRV2605L_EFFECT_TRANSITION_CLICK_5_20,
242 transition_click_10, 242 DRV2605L_EFFECT_TRANSITION_CLICK_6_10,
243 transition_hum, 243 DRV2605L_EFFECT_TRANSITION_HUM_1_100,
244 transition_hum_80, 244 DRV2605L_EFFECT_TRANSITION_HUM_2_80,
245 transition_hum_60, 245 DRV2605L_EFFECT_TRANSITION_HUM_3_60,
246 transition_hum_40, 246 DRV2605L_EFFECT_TRANSITION_HUM_4_40,
247 transition_hum_20, 247 DRV2605L_EFFECT_TRANSITION_HUM_5_20,
248 transition_hum_10, 248 DRV2605L_EFFECT_TRANSITION_HUM_6_10,
249 transition_rampdown_long_smooth1, 249 DRV2605L_EFFECT_TRANSITION_RAMP_DOWN_LONG_SMOOTH_1_100,
250 transition_rampdown_long_smooth2, 250 DRV2605L_EFFECT_TRANSITION_RAMP_DOWN_LONG_SMOOTH_2_100,
251 transition_rampdown_med_smooth1, 251 DRV2605L_EFFECT_TRANSITION_RAMP_DOWN_MEDIUM_SMOOTH_1_100,
252 transition_rampdown_med_smooth2, 252 DRV2605L_EFFECT_TRANSITION_RAMP_DOWN_MEDIUM_SMOOTH_2_100,
253 transition_rampdown_short_smooth1, 253 DRV2605L_EFFECT_TRANSITION_RAMP_DOWN_SHORT_SMOOTH_1_100,
254 transition_rampdown_short_smooth2, 254 DRV2605L_EFFECT_TRANSITION_RAMP_DOWN_SHORT_SMOOTH_2_100,
255 transition_rampdown_long_sharp1, 255 DRV2605L_EFFECT_TRANSITION_RAMP_DOWN_LONG_SHARP_1_100,
256 transition_rampdown_long_sharp2, 256 DRV2605L_EFFECT_TRANSITION_RAMP_DOWN_LONG_SHARP_2_100,
257 transition_rampdown_med_sharp1, 257 DRV2605L_EFFECT_TRANSITION_RAMP_DOWN_MEDIUM_SHARP_1_100,
258 transition_rampdown_med_sharp2, 258 DRV2605L_EFFECT_TRANSITION_RAMP_DOWN_MEDIUM_SHARP_2_100,
259 transition_rampdown_short_sharp1, 259 DRV2605L_EFFECT_TRANSITION_RAMP_DOWN_SHORT_SHARP_1_100,
260 transition_rampdown_short_sharp2, 260 DRV2605L_EFFECT_TRANSITION_RAMP_DOWN_SHORT_SHARP_2_100,
261 transition_rampup_long_smooth1, 261 DRV2605L_EFFECT_TRANSITION_RAMP_UP_LONG_SMOOTH_1_100,
262 transition_rampup_long_smooth2, 262 DRV2605L_EFFECT_TRANSITION_RAMP_UP_LONG_SMOOTH_2_100,
263 transition_rampup_med_smooth1, 263 DRV2605L_EFFECT_TRANSITION_RAMP_UP_MEDIUM_SMOOTH_1_100,
264 transition_rampup_med_smooth2, 264 DRV2605L_EFFECT_TRANSITION_RAMP_UP_MEDIUM_SMOOTH_2_100,
265 transition_rampup_short_smooth1, 265 DRV2605L_EFFECT_TRANSITION_RAMP_UP_SHORT_SMOOTH_1_100,
266 transition_rampup_short_smooth2, 266 DRV2605L_EFFECT_TRANSITION_RAMP_UP_SHORT_SMOOTH_2_100,
267 transition_rampup_long_sharp1, 267 DRV2605L_EFFECT_TRANSITION_RAMP_UP_LONG_SHARP_1_100,
268 transition_rampup_long_sharp2, 268 DRV2605L_EFFECT_TRANSITION_RAMP_UP_LONG_SHARP_2_100,
269 transition_rampup_med_sharp1, 269 DRV2605L_EFFECT_TRANSITION_RAMP_UP_MEDIUM_SHARP_1_100,
270 transition_rampup_med_sharp2, 270 DRV2605L_EFFECT_TRANSITION_RAMP_UP_MEDIUM_SHARP_2_100,
271 transition_rampup_short_sharp1, 271 DRV2605L_EFFECT_TRANSITION_RAMP_UP_SHORT_SHARP_1_100,
272 transition_rampup_short_sharp2, 272 DRV2605L_EFFECT_TRANSITION_RAMP_UP_SHORT_SHARP_2_100,
273 transition_rampdown_long_smooth1_50, 273 DRV2605L_EFFECT_TRANSITION_RAMP_DOWN_LONG_SMOOTH_1_50,
274 transition_rampdown_long_smooth2_50, 274 DRV2605L_EFFECT_TRANSITION_RAMP_DOWN_LONG_SMOOTH_2_50,
275 transition_rampdown_med_smooth1_50, 275 DRV2605L_EFFECT_TRANSITION_RAMP_DOWN_MEDIUM_SMOOTH_1_50,
276 transition_rampdown_med_smooth2_50, 276 DRV2605L_EFFECT_TRANSITION_RAMP_DOWN_MEDIUM_SMOOTH_2_50,
277 transition_rampdown_short_smooth1_50, 277 DRV2605L_EFFECT_TRANSITION_RAMP_DOWN_SHORT_SMOOTH_1_50,
278 transition_rampdown_short_smooth2_50, 278 DRV2605L_EFFECT_TRANSITION_RAMP_DOWN_SHORT_SMOOTH_2_50,
279 transition_rampdown_long_sharp1_50, 279 DRV2605L_EFFECT_TRANSITION_RAMP_DOWN_LONG_SHARP_1_50,
280 transition_rampdown_long_sharp2_50, 280 DRV2605L_EFFECT_TRANSITION_RAMP_DOWN_LONG_SHARP_2_50,
281 transition_rampdown_med_sharp1_50, 281 DRV2605L_EFFECT_TRANSITION_RAMP_DOWN_MEDIUM_SHARP_1_50,
282 transition_rampdown_med_sharp2_50, 282 DRV2605L_EFFECT_TRANSITION_RAMP_DOWN_MEDIUM_SHARP_2_50,
283 transition_rampdown_short_sharp1_50, 283 DRV2605L_EFFECT_TRANSITION_RAMP_DOWN_SHORT_SHARP_1_50,
284 transition_rampdown_short_sharp2_50, 284 DRV2605L_EFFECT_TRANSITION_RAMP_DOWN_SHORT_SHARP_2_50,
285 transition_rampup_long_smooth1_50, 285 DRV2605L_EFFECT_TRANSITION_RAMP_UP_LONG_SMOOTH_1_50,
286 transition_rampup_long_smooth2_50, 286 DRV2605L_EFFECT_TRANSITION_RAMP_UP_LONG_SMOOTH_2_50,
287 transition_rampup_med_smooth1_50, 287 DRV2605L_EFFECT_TRANSITION_RAMP_UP_MEDIUM_SMOOTH_1_50,
288 transition_rampup_med_smooth2_50, 288 DRV2605L_EFFECT_TRANSITION_RAMP_UP_MEDIUM_SMOOTH_2_50,
289 transition_rampup_short_smooth1_50, 289 DRV2605L_EFFECT_TRANSITION_RAMP_UP_SHORT_SMOOTH_1_50,
290 transition_rampup_short_smooth2_50, 290 DRV2605L_EFFECT_TRANSITION_RAMP_UP_SHORT_SMOOTH_2_50,
291 transition_rampup_long_sharp1_50, 291 DRV2605L_EFFECT_TRANSITION_RAMP_UP_LONG_SHARP_1_50,
292 transition_rampup_long_sharp2_50, 292 DRV2605L_EFFECT_TRANSITION_RAMP_UP_LONG_SHARP_2_50,
293 transition_rampup_med_sharp1_50, 293 DRV2605L_EFFECT_TRANSITION_RAMP_UP_MEDIUM_SHARP_1_50,
294 transition_rampup_med_sharp2_50, 294 DRV2605L_EFFECT_TRANSITION_RAMP_UP_MEDIUM_SHARP_2_50,
295 transition_rampup_short_sharp1_50, 295 DRV2605L_EFFECT_TRANSITION_RAMP_UP_SHORT_SHARP_1_50,
296 transition_rampup_short_sharp2_50, 296 DRV2605L_EFFECT_TRANSITION_RAMP_UP_SHORT_SHARP_2_50,
297 long_buzz_for_programmatic_stopping, 297 DRV2605L_EFFECT_LONG_BUZZ_FOR_PROGRAMMATIC_STOPPING,
298 smooth_hum1_50, 298 DRV2605L_EFFECT_SMOOTH_HUM_1_50,
299 smooth_hum2_40, 299 DRV2605L_EFFECT_SMOOTH_HUM_2_40,
300 smooth_hum3_30, 300 DRV2605L_EFFECT_SMOOTH_HUM_3_30,
301 smooth_hum4_20, 301 DRV2605L_EFFECT_SMOOTH_HUM_4_20,
302 smooth_hum5_10, 302 DRV2605L_EFFECT_SMOOTH_HUM_5_10,
303 drv_effect_max 303 DRV2605L_EFFECT_COUNT
304} DRV_EFFECT; 304} drv2605l_effect_t;
305 305
306/* Register bit array unions */ 306/* Register bit array unions */
307 307
308typedef union DRVREG_STATUS { /* register 0x00 */ 308typedef union { /* register 0x1A */
309 uint8_t Byte; 309 uint8_t raw;
310 struct {
311 uint8_t OC_DETECT : 1; /* set to 1 when overcurrent event is detected */
312 uint8_t OVER_TEMP : 1; /* set to 1 when device exceeds temp threshold */
313 uint8_t FB_STS : 1; /* set to 1 when feedback controller has timed out */
314 /* auto-calibration routine and diagnostic result
315 * result | auto-calibation | diagnostic |
316 * 0 | passed | actuator func normal |
317 * 1 | failed | actuator func fault* |
318 * * actuator is not present or is shorted, timing out, or giving out–of-range back-EMF */
319 uint8_t DIAG_RESULT : 1;
320 uint8_t : 1;
321 uint8_t DEVICE_ID : 3; /* Device IDs 3: DRV2605 4: DRV2604 5: DRV2604L 6: DRV2605L */
322 } Bits;
323} DRVREG_STATUS;
324
325typedef union DRVREG_MODE { /* register 0x01 */
326 uint8_t Byte;
327 struct {
328 uint8_t MODE : 3; /* Mode setting */
329 uint8_t : 3;
330 uint8_t STANDBY : 1; /* 0:standby 1:ready */
331 } Bits;
332} DRVREG_MODE;
333
334typedef union DRVREG_WAIT {
335 uint8_t Byte;
336 struct {
337 uint8_t WAIT_MODE : 1; /* Set to 1 to interpret as wait for next 7 bits x10ms */
338 uint8_t WAIT_TIME : 7;
339 } Bits;
340} DRVREG_WAIT;
341
342typedef union DRVREG_FBR { /* register 0x1A */
343 uint8_t Byte;
344 struct { 310 struct {
345 uint8_t BEMF_GAIN : 2; 311 uint8_t BEMF_GAIN : 2;
346 uint8_t LOOP_GAIN : 2; 312 uint8_t LOOP_GAIN : 2;
347 uint8_t BRAKE_FACTOR : 3; 313 uint8_t BRAKE_FACTOR : 3;
348 uint8_t ERM_LRA : 1; 314 uint8_t ERM_LRA : 1;
349 } Bits; 315 } bits;
350} DRVREG_FBR; 316} drv2605l_reg_feedback_ctrl_t;
351 317
352typedef union DRVREG_CTRL1 { /* register 0x1B */ 318typedef union { /* register 0x1B */
353 uint8_t Byte; 319 uint8_t raw;
354 struct { 320 struct {
355 uint8_t C1_DRIVE_TIME : 5; 321 uint8_t C1_DRIVE_TIME : 5;
356 uint8_t C1_AC_COUPLE : 1; 322 uint8_t C1_AC_COUPLE : 1;
357 uint8_t : 1; 323 uint8_t : 1;
358 uint8_t C1_STARTUP_BOOST : 1; 324 uint8_t C1_STARTUP_BOOST : 1;
359 } Bits; 325 } bits;
360} DRVREG_CTRL1; 326} drv2605l_reg_ctrl1_t;
361 327
362typedef union DRVREG_CTRL2 { /* register 0x1C */ 328typedef union { /* register 0x1C */
363 uint8_t Byte; 329 uint8_t raw;
364 struct { 330 struct {
365 uint8_t C2_IDISS_TIME : 2; 331 uint8_t C2_IDISS_TIME : 2;
366 uint8_t C2_BLANKING_TIME : 2; 332 uint8_t C2_BLANKING_TIME : 2;
367 uint8_t C2_SAMPLE_TIME : 2; 333 uint8_t C2_SAMPLE_TIME : 2;
368 uint8_t C2_BRAKE_STAB : 1; 334 uint8_t C2_BRAKE_STAB : 1;
369 uint8_t C2_BIDIR_INPUT : 1; 335 uint8_t C2_BIDIR_INPUT : 1;
370 } Bits; 336 } bits;
371} DRVREG_CTRL2; 337} drv2605l_reg_ctrl2_t;
372 338
373typedef union DRVREG_CTRL3 { /* register 0x1D */ 339typedef union { /* register 0x1D */
374 uint8_t Byte; 340 uint8_t raw;
375 struct { 341 struct {
376 uint8_t C3_LRA_OPEN_LOOP : 1; 342 uint8_t C3_LRA_OPEN_LOOP : 1;
377 uint8_t C3_N_PWM_ANALOG : 1; 343 uint8_t C3_N_PWM_ANALOG : 1;
@@ -380,11 +346,11 @@ typedef union DRVREG_CTRL3 { /* register 0x1D */
380 uint8_t C3_SUPPLY_COMP_DIS : 1; 346 uint8_t C3_SUPPLY_COMP_DIS : 1;
381 uint8_t C3_ERM_OPEN_LOOP : 1; 347 uint8_t C3_ERM_OPEN_LOOP : 1;
382 uint8_t C3_NG_THRESH : 2; 348 uint8_t C3_NG_THRESH : 2;
383 } Bits; 349 } bits;
384} DRVREG_CTRL3; 350} drv2605l_reg_ctrl3_t;
385 351
386typedef union DRVREG_CTRL4 { /* register 0x1E */ 352typedef union { /* register 0x1E */
387 uint8_t Byte; 353 uint8_t raw;
388 struct { 354 struct {
389 uint8_t C4_OTP_PROGRAM : 1; 355 uint8_t C4_OTP_PROGRAM : 1;
390 uint8_t : 1; 356 uint8_t : 1;
@@ -392,16 +358,5 @@ typedef union DRVREG_CTRL4 { /* register 0x1E */
392 uint8_t : 1; 358 uint8_t : 1;
393 uint8_t C4_AUTO_CAL_TIME : 2; 359 uint8_t C4_AUTO_CAL_TIME : 2;
394 uint8_t C4_ZC_DET_TIME : 2; 360 uint8_t C4_ZC_DET_TIME : 2;
395 } Bits; 361 } bits;
396} DRVREG_CTRL4; 362} drv2605l_reg_ctrl4_t;
397
398typedef union DRVREG_CTRL5 { /* register 0x1F */
399 uint8_t Byte;
400 struct {
401 uint8_t C5_IDISS_TIME : 2;
402 uint8_t C5_BLANKING_TIME : 2;
403 uint8_t C5_PLAYBACK_INTERVAL : 1;
404 uint8_t C5_LRA_AUTO_OPEN_LOOP : 1;
405 uint8_t C5_AUTO_OL_CNT : 2;
406 } Bits;
407} DRVREG_CTRL5;
diff --git a/keyboards/boston_meetup/2019/config.h b/keyboards/boston_meetup/2019/config.h
index d8888eb92f..7309021f09 100644
--- a/keyboards/boston_meetup/2019/config.h
+++ b/keyboards/boston_meetup/2019/config.h
@@ -38,52 +38,52 @@
38 38
39/* Haptic Driver initialization settings 39/* Haptic Driver initialization settings
40 * Feedback Control Settings */ 40 * Feedback Control Settings */
41#define FB_ERM_LRA 1 /* For ERM:0 or LRA:1*/ 41#define DRV2605L_FB_ERM_LRA 1 /* For ERM:0 or LRA:1*/
42#define FB_BRAKEFACTOR 6 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */ 42#define DRV2605L_FB_BRAKEFACTOR 6 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */
43#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ 43#define DRV2605L_FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */
44 44
45/* default 3V ERM vibration motor voltage and library*/ 45/* default 3V ERM vibration motor voltage and library*/
46#if FB_ERM_LRA == 0 46#if DRV2605L_FB_ERM_LRA == 0
47#define RATED_VOLTAGE 3 47#define DRV2605L_RATED_VOLTAGE 3
48#define V_RMS 2.3 48#define DRV2605L_V_RMS 2.3
49#define V_PEAK 3.30 49#define DRV2605L_V_PEAK 3.30
50/* Library Selection */ 50/* Library Selection */
51#define DRV2605L_LIBRARY 4 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */ 51#define DRV2605L_LIBRARY 4 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
52 52
53/* default 2V LRA voltage and library */ 53/* default 2V LRA voltage and library */
54#elif FB_ERM_LRA == 1 54#elif DRV2605L_FB_ERM_LRA == 1
55#define RATED_VOLTAGE 2 55#define DRV2605L_RATED_VOLTAGE 2
56#define V_RMS 2.0 56#define DRV2605L_V_RMS 2.0
57#define V_PEAK 2.85 57#define DRV2605L_V_PEAK 2.85
58#define F_LRA 200 58#define DRV2605L_F_LRA 200
59/* Library Selection */ 59/* Library Selection */
60#define DRV2605L_LIBRARY 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */ 60#define DRV2605L_LIBRARY 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
61 61
62#endif 62#endif
63 63
64/* Control 1 register settings */ 64/* Control 1 register settings */
65#define DRIVE_TIME 25 65#define DRV2605L_DRIVE_TIME 25
66#define AC_COUPLE 0 66#define DRV2605L_AC_COUPLE 0
67#define STARTUP_BOOST 1 67#define DRV2605L_STARTUP_BOOST 1
68 68
69/* Control 2 Settings */ 69/* Control 2 Settings */
70#define BIDIR_INPUT 1 70#define DRV2605L_BIDIR_INPUT 1
71#define BRAKE_STAB 1 /* Loopgain is reduced when braking is almost complete to improve stability */ 71#define DRV2605L_BRAKE_STAB 1 /* Loopgain is reduced when braking is almost complete to improve stability */
72#define SAMPLE_TIME 3 72#define DRV2605L_SAMPLE_TIME 3
73#define BLANKING_TIME 1 73#define DRV2605L_BLANKING_TIME 1
74#define IDISS_TIME 1 74#define DRV2605L_IDISS_TIME 1
75 75
76/* Control 3 settings */ 76/* Control 3 settings */
77#define NG_THRESH 2 77#define DRV2605L_NG_THRESH 2
78#define ERM_OPEN_LOOP 1 78#define DRV2605L_ERM_OPEN_LOOP 1
79#define SUPPLY_COMP_DIS 0 79#define DRV2605L_SUPPLY_COMP_DIS 0
80#define DATA_FORMAT_RTO 0 80#define DRV2605L_DATA_FORMAT_RTO 0
81#define LRA_DRIVE_MODE 0 81#define DRV2605L_LRA_DRIVE_MODE 0
82#define N_PWM_ANALOG 0 82#define DRV2605L_N_PWM_ANALOG 0
83#define LRA_OPEN_LOOP 0 83#define DRV2605L_LRA_OPEN_LOOP 0
84/* Control 4 settings */ 84/* Control 4 settings */
85#define ZC_DET_TIME 0 85#define DRV2605L_ZC_DET_TIME 0
86#define AUTO_CAL_TIME 3 86#define DRV2605L_AUTO_CAL_TIME 3
87 87
88#define RGBLIGHT_EFFECT_BREATHING 88#define RGBLIGHT_EFFECT_BREATHING
89#define RGBLIGHT_EFFECT_RAINBOW_MOOD 89#define RGBLIGHT_EFFECT_RAINBOW_MOOD
diff --git a/keyboards/buzzard/keymaps/crehmann/config.h b/keyboards/buzzard/keymaps/crehmann/config.h
index ee3192e3fd..446ae01d34 100644
--- a/keyboards/buzzard/keymaps/crehmann/config.h
+++ b/keyboards/buzzard/keymaps/crehmann/config.h
@@ -25,8 +25,8 @@
25#define NO_HAPTIC_PUNCTUATION 25#define NO_HAPTIC_PUNCTUATION
26#define NO_HAPTIC_NAV 26#define NO_HAPTIC_NAV
27#define NO_HAPTIC_NUMERIC 27#define NO_HAPTIC_NUMERIC
28#define DRV2605L_GREETING alert_750ms 28#define DRV2605L_GREETING DRV2605L_EFFECT_750_MS_ALERT_100
29#define DRV2605L_DEFAULT_MODE sharp_tick1 29#define DRV2605L_DEFAULT_MODE DRV2605L_EFFECT_SHARP_TICK_1_100
30#endif 30#endif
31 31
32#ifdef PS2_MOUSE_ENABLE 32#ifdef PS2_MOUSE_ENABLE
diff --git a/keyboards/buzzard/keymaps/crehmann/features/haptic_utils.c b/keyboards/buzzard/keymaps/crehmann/features/haptic_utils.c
index 8f5aa0e662..941d559f42 100644
--- a/keyboards/buzzard/keymaps/crehmann/features/haptic_utils.c
+++ b/keyboards/buzzard/keymaps/crehmann/features/haptic_utils.c
@@ -23,19 +23,19 @@ void process_layer_pulse(layer_state_t state) {
23#ifdef HAPTIC_ENABLE 23#ifdef HAPTIC_ENABLE
24 switch (get_highest_layer(state)) { 24 switch (get_highest_layer(state)) {
25 case 1: 25 case 1:
26 drv2605l_pulse(soft_bump); 26 drv2605l_pulse(DRV2605L_EFFECT_SOFT_BUMP_100);
27 break; 27 break;
28 case 2: 28 case 2:
29 drv2605l_pulse(sh_dblsharp_tick); 29 drv2605l_pulse(DRV2605L_EFFECT_SHORT_DOUBLE_SHARP_TICK_1_100);
30 break; 30 break;
31 case 3: 31 case 3:
32 drv2605l_pulse(lg_dblclick_str); 32 drv2605l_pulse(DRV2605L_EFFECT_LONG_DOUBLE_SHARP_CLICK_STRONG_1_100);
33 break; 33 break;
34 case 4: 34 case 4:
35 drv2605l_pulse(soft_bump); 35 drv2605l_pulse(DRV2605L_EFFECT_SOFT_BUMP_100);
36 break; 36 break;
37 case 5: 37 case 5:
38 drv2605l_pulse(pulsing_sharp); 38 drv2605l_pulse(DRV2605L_EFFECT_PULSING_SHARP_1_100);
39 break; 39 break;
40 } 40 }
41#endif 41#endif
diff --git a/keyboards/buzzard/keymaps/default/config.h b/keyboards/buzzard/keymaps/default/config.h
index d5bf3e4dc6..0a2776afd1 100644
--- a/keyboards/buzzard/keymaps/default/config.h
+++ b/keyboards/buzzard/keymaps/default/config.h
@@ -25,8 +25,8 @@
25#define NO_HAPTIC_PUNCTUATION 25#define NO_HAPTIC_PUNCTUATION
26#define NO_HAPTIC_NAV 26#define NO_HAPTIC_NAV
27#define NO_HAPTIC_NUMERIC 27#define NO_HAPTIC_NUMERIC
28#define DRV2605L_GREETING alert_750ms 28#define DRV2605L_GREETING DRV2605L_EFFECT_750_MS_ALERT_100
29#define DRV2605L_DEFAULT_MODE sharp_tick1 29#define DRV2605L_DEFAULT_MODE DRV2605L_EFFECT_SHARP_TICK_1_100
30#endif 30#endif
31 31
32 32
diff --git a/keyboards/buzzard/rev1/rev1.c b/keyboards/buzzard/rev1/rev1.c
index c26e4d5831..03c3269a7e 100644
--- a/keyboards/buzzard/rev1/rev1.c
+++ b/keyboards/buzzard/rev1/rev1.c
@@ -100,27 +100,27 @@ __attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) {
100 switch (get_highest_layer(state)) { 100 switch (get_highest_layer(state)) {
101 case 1: 101 case 1:
102#ifdef HAPTIC_ENABLE 102#ifdef HAPTIC_ENABLE
103 drv2605l_pulse(soft_bump); 103 drv2605l_pulse(DRV2605L_EFFECT_SOFT_BUMP_100);
104#endif 104#endif
105 break; 105 break;
106 case 2: 106 case 2:
107#ifdef HAPTIC_ENABLE 107#ifdef HAPTIC_ENABLE
108 drv2605l_pulse(sh_dblsharp_tick); 108 drv2605l_pulse(DRV2605L_EFFECT_SHORT_DOUBLE_SHARP_TICK_1_100);
109#endif 109#endif
110 break; 110 break;
111 case 3: 111 case 3:
112#ifdef HAPTIC_ENABLE 112#ifdef HAPTIC_ENABLE
113 drv2605l_pulse(lg_dblclick_str); 113 drv2605l_pulse(DRV2605L_EFFECT_LONG_DOUBLE_SHARP_CLICK_STRONG_1_100);
114#endif 114#endif
115 break; 115 break;
116 case 4: 116 case 4:
117#ifdef HAPTIC_ENABLE 117#ifdef HAPTIC_ENABLE
118 drv2605l_pulse(soft_bump); 118 drv2605l_pulse(DRV2605L_EFFECT_SOFT_BUMP_100);
119#endif 119#endif
120 break; 120 break;
121 case 5: 121 case 5:
122#ifdef HAPTIC_ENABLE 122#ifdef HAPTIC_ENABLE
123 drv2605l_pulse(pulsing_sharp); 123 drv2605l_pulse(DRV2605L_EFFECT_PULSING_SHARP_1_100);
124#endif 124#endif
125 break; 125 break;
126 } 126 }
diff --git a/keyboards/hadron/ver3/config.h b/keyboards/hadron/ver3/config.h
index 675bd218f0..2c5bdfcaa8 100644
--- a/keyboards/hadron/ver3/config.h
+++ b/keyboards/hadron/ver3/config.h
@@ -60,52 +60,52 @@
60 60
61/* Haptic Driver initialization settings 61/* Haptic Driver initialization settings
62 * Feedback Control Settings */ 62 * Feedback Control Settings */
63#define FB_ERM_LRA 1 /* For ERM:0 or LRA:1*/ 63#define DRV2605L_FB_ERM_LRA 1 /* For ERM:0 or LRA:1*/
64#define FB_BRAKEFACTOR 6 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */ 64#define DRV2605L_FB_BRAKEFACTOR 6 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */
65#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ 65#define DRV2605L_FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */
66 66
67/* default 3V ERM vibration motor voltage and library*/ 67/* default 3V ERM vibration motor voltage and library*/
68#if FB_ERM_LRA == 0 68#if DRV2605L_FB_ERM_LRA == 0
69#define RATED_VOLTAGE 3 69#define DRV2605L_RATED_VOLTAGE 3
70#define V_RMS 2.3 70#define DRV2605L_V_RMS 2.3
71#define V_PEAK 3.30 71#define DRV2605L_V_PEAK 3.30
72/* Library Selection */ 72/* Library Selection */
73#define DRV2605L_LIBRARY 4 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */ 73#define DRV2605L_LIBRARY 4 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
74 74
75/* default 2V LRA voltage and library */ 75/* default 2V LRA voltage and library */
76#elif FB_ERM_LRA == 1 76#elif DRV2605L_FB_ERM_LRA == 1
77#define RATED_VOLTAGE 2 77#define DRV2605L_RATED_VOLTAGE 2
78#define V_RMS 2.0 78#define DRV2605L_V_RMS 2.0
79#define V_PEAK 2.85 79#define DRV2605L_V_PEAK 2.85
80#define F_LRA 200 80#define DRV2605L_F_LRA 200
81/* Library Selection */ 81/* Library Selection */
82#define DRV2605L_LIBRARY 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */ 82#define DRV2605L_LIBRARY 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
83 83
84#endif 84#endif
85 85
86/* Control 1 register settings */ 86/* Control 1 register settings */
87#define DRIVE_TIME 25 87#define DRV2605L_DRIVE_TIME 25
88#define AC_COUPLE 0 88#define DRV2605L_AC_COUPLE 0
89#define STARTUP_BOOST 1 89#define DRV2605L_STARTUP_BOOST 1
90 90
91/* Control 2 Settings */ 91/* Control 2 Settings */
92#define BIDIR_INPUT 1 92#define DRV2605L_BIDIR_INPUT 1
93#define BRAKE_STAB 1 /* Loopgain is reduced when braking is almost complete to improve stability */ 93#define DRV2605L_BRAKE_STAB 1 /* Loopgain is reduced when braking is almost complete to improve stability */
94#define SAMPLE_TIME 3 94#define DRV2605L_SAMPLE_TIME 3
95#define BLANKING_TIME 1 95#define DRV2605L_BLANKING_TIME 1
96#define IDISS_TIME 1 96#define DRV2605L_IDISS_TIME 1
97 97
98/* Control 3 settings */ 98/* Control 3 settings */
99#define NG_THRESH 2 99#define DRV2605L_NG_THRESH 2
100#define ERM_OPEN_LOOP 1 100#define DRV2605L_ERM_OPEN_LOOP 1
101#define SUPPLY_COMP_DIS 0 101#define DRV2605L_SUPPLY_COMP_DIS 0
102#define DATA_FORMAT_RTO 0 102#define DRV2605L_DATA_FORMAT_RTO 0
103#define LRA_DRIVE_MODE 0 103#define DRV2605L_LRA_DRIVE_MODE 0
104#define N_PWM_ANALOG 0 104#define DRV2605L_N_PWM_ANALOG 0
105#define LRA_OPEN_LOOP 0 105#define DRV2605L_LRA_OPEN_LOOP 0
106/* Control 4 settings */ 106/* Control 4 settings */
107#define ZC_DET_TIME 0 107#define DRV2605L_ZC_DET_TIME 0
108#define AUTO_CAL_TIME 3 108#define DRV2605L_AUTO_CAL_TIME 3
109 109
110#define RGBLIGHT_EFFECT_BREATHING 110#define RGBLIGHT_EFFECT_BREATHING
111#define RGBLIGHT_EFFECT_RAINBOW_MOOD 111#define RGBLIGHT_EFFECT_RAINBOW_MOOD
diff --git a/keyboards/handwired/swiftrax/bumblebee/keymaps/default/keymap.c b/keyboards/handwired/swiftrax/bumblebee/keymaps/default/keymap.c
index 7e7247c80f..fef24f402f 100644
--- a/keyboards/handwired/swiftrax/bumblebee/keymaps/default/keymap.c
+++ b/keyboards/handwired/swiftrax/bumblebee/keymaps/default/keymap.c
@@ -17,13 +17,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
17#include QMK_KEYBOARD_H 17#include QMK_KEYBOARD_H
18 18
19#define SOLENOID_DEFAULT_BUZZ 1 19#define SOLENOID_DEFAULT_BUZZ 1
20#define FB_ERM_LRA 0 20#define DRV2605L_FB_ERM_LRA 0
21#define FB_BRAKEFACTOR 3 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */ 21#define DRV2605L_FB_BRAKEFACTOR 3 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */
22#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ 22#define DRV2605L_FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */
23 23
24/* Please refer to your datasheet for the optimal setting for your specific motor. */ 24/* Please refer to your datasheet for the optimal setting for your specific motor. */
25#define RATED_VOLTAGE 3 25#define DRV2605L_RATED_VOLTAGE 3
26#define V_PEAK 5 26#define DRV2605L_V_PEAK 5
27 27
28const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 28const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
29 [0] = LAYOUT_all( 29 [0] = LAYOUT_all(
diff --git a/keyboards/handwired/swiftrax/bumblebee/keymaps/via/keymap.c b/keyboards/handwired/swiftrax/bumblebee/keymaps/via/keymap.c
index a48f998100..12791a69dd 100644
--- a/keyboards/handwired/swiftrax/bumblebee/keymaps/via/keymap.c
+++ b/keyboards/handwired/swiftrax/bumblebee/keymaps/via/keymap.c
@@ -17,13 +17,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
17#include QMK_KEYBOARD_H 17#include QMK_KEYBOARD_H
18 18
19#define SOLENOID_DEFAULT_BUZZ 1 19#define SOLENOID_DEFAULT_BUZZ 1
20#define FB_ERM_LRA 0 20#define DRV2605L_FB_ERM_LRA 0
21#define FB_BRAKEFACTOR 3 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */ 21#define DRV2605L_FB_BRAKEFACTOR 3 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */
22#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ 22#define DRV2605L_FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */
23 23
24/* Please refer to your datasheet for the optimal setting for your specific motor. */ 24/* Please refer to your datasheet for the optimal setting for your specific motor. */
25#define RATED_VOLTAGE 3 25#define DRV2605L_RATED_VOLTAGE 3
26#define V_PEAK 5 26#define DRV2605L_V_PEAK 5
27 27
28const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 28const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
29 [0] = LAYOUT_all( 29 [0] = LAYOUT_all(
diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/config.h
index 913c613c98..5cb2a76de2 100644
--- a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/config.h
+++ b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/config.h
@@ -31,6 +31,6 @@
31#define BOOTMAGIC_LITE_EEPROM_COLUMN_RIGHT 5 31#define BOOTMAGIC_LITE_EEPROM_COLUMN_RIGHT 5
32 32
33 33
34#define FB_ERM_LRA 0 34#define DRV2605L_FB_ERM_LRA 0
35#define DRV2605L_GREETING alert_750ms 35#define DRV2605L_GREETING DRV2605L_EFFECT_750_MS_ALERT_100
36#define DRV2605L_DEFAULT_MODE buzz 36#define DRV2605L_DEFAULT_MODE DRV2605L_EFFECT_BUZZ_1_100
diff --git a/keyboards/hillside/46/0_1/config.h b/keyboards/hillside/46/0_1/config.h
index dc8654b4bb..20c4deca40 100644
--- a/keyboards/hillside/46/0_1/config.h
+++ b/keyboards/hillside/46/0_1/config.h
@@ -10,16 +10,16 @@
10 10
11/* Haptic hardware */ 11/* Haptic hardware */
12// The Pimoroni is the likely hardware, for which these settings work 12// The Pimoroni is the likely hardware, for which these settings work
13#define FB_ERM_LRA 1 13#define DRV2605L_FB_ERM_LRA 1
14#define FB_BRAKEFACTOR 3 /* 1x:0, 2x:1, 3x:2, 4x:3, 6:4, 8:5, 16:6, Disable:7 */ 14#define DRV2605L_FB_BRAKEFACTOR 3 /* 1x:0, 2x:1, 3x:2, 4x:3, 6:4, 8:5, 16:6, Disable:7 */
15#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ 15#define DRV2605L_FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */
16/* Please refer to your datasheet for optimal setting for your specific motor.*/ 16/* Please refer to your datasheet for optimal setting for your specific motor.*/
17#define RATED_VOLTAGE 2 17#define DRV2605L_RATED_VOLTAGE 2
18#define V_PEAK 2.8 18#define DRV2605L_V_PEAK 2.8
19#define V_RMS 2.0 19#define DRV2605L_V_RMS 2.0
20#define F_LRA 205 /* resonance freq */ 20#define DRV2605L_F_LRA 205 /* resonance freq */
21 21
22/* Haptic waveforms */ 22/* Haptic waveforms */
23// Two mild waveforms 23// Two mild waveforms
24#define DRV2605L_GREETING alert_750ms 24#define DRV2605L_GREETING DRV2605L_EFFECT_750_MS_ALERT_100
25#define DRV2605L_DEFAULT_MODE sharp_tick3_60 25#define DRV2605L_DEFAULT_MODE DRV2605L_EFFECT_SHARP_TICK_3_60
diff --git a/keyboards/hillside/48/0_1/config.h b/keyboards/hillside/48/0_1/config.h
index 3b432cf17b..150573c165 100644
--- a/keyboards/hillside/48/0_1/config.h
+++ b/keyboards/hillside/48/0_1/config.h
@@ -5,16 +5,16 @@
5 5
6/* Haptic hardware */ 6/* Haptic hardware */
7// The Pimoroni is the likely hardware, for which these settings work 7// The Pimoroni is the likely hardware, for which these settings work
8#define FB_ERM_LRA 1 8#define DRV2605L_FB_ERM_LRA 1
9#define FB_BRAKEFACTOR 3 /* 1x:0, 2x:1, 3x:2, 4x:3, 6:4, 8:5, 16:6, Disable:7 */ 9#define DRV2605L_FB_BRAKEFACTOR 3 /* 1x:0, 2x:1, 3x:2, 4x:3, 6:4, 8:5, 16:6, Disable:7 */
10#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ 10#define DRV2605L_FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */
11/* Please refer to your datasheet for optimal setting for your specific motor.*/ 11/* Please refer to your datasheet for optimal setting for your specific motor.*/
12#define RATED_VOLTAGE 2 12#define DRV2605L_RATED_VOLTAGE 2
13#define V_PEAK 2.8 13#define DRV2605L_V_PEAK 2.8
14#define V_RMS 2.0 14#define DRV2605L_V_RMS 2.0
15#define F_LRA 205 /* resonance freq */ 15#define DRV2605L_F_LRA 205 /* resonance freq */
16 16
17/* Haptic waveforms */ 17/* Haptic waveforms */
18// Two mild waveforms 18// Two mild waveforms
19#define DRV2605L_GREETING alert_750ms 19#define DRV2605L_GREETING DRV2605L_EFFECT_750_MS_ALERT_100
20#define DRV2605L_DEFAULT_MODE sharp_tick3_60 20#define DRV2605L_DEFAULT_MODE DRV2605L_EFFECT_SHARP_TICK_3_60
diff --git a/keyboards/hillside/52/0_1/config.h b/keyboards/hillside/52/0_1/config.h
index dc8654b4bb..20c4deca40 100644
--- a/keyboards/hillside/52/0_1/config.h
+++ b/keyboards/hillside/52/0_1/config.h
@@ -10,16 +10,16 @@
10 10
11/* Haptic hardware */ 11/* Haptic hardware */
12// The Pimoroni is the likely hardware, for which these settings work 12// The Pimoroni is the likely hardware, for which these settings work
13#define FB_ERM_LRA 1 13#define DRV2605L_FB_ERM_LRA 1
14#define FB_BRAKEFACTOR 3 /* 1x:0, 2x:1, 3x:2, 4x:3, 6:4, 8:5, 16:6, Disable:7 */ 14#define DRV2605L_FB_BRAKEFACTOR 3 /* 1x:0, 2x:1, 3x:2, 4x:3, 6:4, 8:5, 16:6, Disable:7 */
15#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ 15#define DRV2605L_FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */
16/* Please refer to your datasheet for optimal setting for your specific motor.*/ 16/* Please refer to your datasheet for optimal setting for your specific motor.*/
17#define RATED_VOLTAGE 2 17#define DRV2605L_RATED_VOLTAGE 2
18#define V_PEAK 2.8 18#define DRV2605L_V_PEAK 2.8
19#define V_RMS 2.0 19#define DRV2605L_V_RMS 2.0
20#define F_LRA 205 /* resonance freq */ 20#define DRV2605L_F_LRA 205 /* resonance freq */
21 21
22/* Haptic waveforms */ 22/* Haptic waveforms */
23// Two mild waveforms 23// Two mild waveforms
24#define DRV2605L_GREETING alert_750ms 24#define DRV2605L_GREETING DRV2605L_EFFECT_750_MS_ALERT_100
25#define DRV2605L_DEFAULT_MODE sharp_tick3_60 25#define DRV2605L_DEFAULT_MODE DRV2605L_EFFECT_SHARP_TICK_3_60
diff --git a/keyboards/pearlboards/atlas/config.h b/keyboards/pearlboards/atlas/config.h
index 65443961ea..1112168194 100644
--- a/keyboards/pearlboards/atlas/config.h
+++ b/keyboards/pearlboards/atlas/config.h
@@ -22,12 +22,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
22#define AUDIO_PIN C6 22#define AUDIO_PIN C6
23 23
24/* Haptic feedback */ 24/* Haptic feedback */
25#define FB_ERM_LRA 0 25#define DRV2605L_FB_ERM_LRA 0
26#define FB_BRAKEFACTOR 3 // For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 26#define DRV2605L_FB_BRAKEFACTOR 3 // For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7
27#define FB_LOOPGAIN 3 // For Low:0, Medium:1, High:2, Very High:3 27#define DRV2605L_FB_LOOPGAIN 3 // For Low:0, Medium:1, High:2, Very High:3
28/* Motor settings */ 28/* Motor settings */
29#define RATED_VOLTAGE 3 29#define DRV2605L_RATED_VOLTAGE 3
30#define V_PEAK 5 30#define DRV2605L_V_PEAK 5
31 31
32/*== all animations enabled ==*/ 32/*== all animations enabled ==*/
33#define RGBLIGHT_EFFECT_ALTERNATING 33#define RGBLIGHT_EFFECT_ALTERNATING
diff --git a/keyboards/pearlboards/pearl/config.h b/keyboards/pearlboards/pearl/config.h
index 374e41284e..091ecfbd81 100644
--- a/keyboards/pearlboards/pearl/config.h
+++ b/keyboards/pearlboards/pearl/config.h
@@ -22,12 +22,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
22#define AUDIO_PIN C6 22#define AUDIO_PIN C6
23 23
24/* Haptic feedback */ 24/* Haptic feedback */
25#define FB_ERM_LRA 0 25#define DRV2605L_FB_ERM_LRA 0
26#define FB_BRAKEFACTOR 3 // For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 26#define DRV2605L_FB_BRAKEFACTOR 3 // For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7
27#define FB_LOOPGAIN 1 // For Low:0, Medium:1, High:2, Very High:3 27#define DRV2605L_FB_LOOPGAIN 1 // For Low:0, Medium:1, High:2, Very High:3
28/* Motor settings */ 28/* Motor settings */
29#define RATED_VOLTAGE 3 29#define DRV2605L_RATED_VOLTAGE 3
30#define V_PEAK 5 30#define DRV2605L_V_PEAK 5
31 31
32/*== all animations enabled ==*/ 32/*== all animations enabled ==*/
33#define RGBLIGHT_EFFECT_ALTERNATING 33#define RGBLIGHT_EFFECT_ALTERNATING
diff --git a/keyboards/pearlboards/zeus/config.h b/keyboards/pearlboards/zeus/config.h
index b3a6188f50..d449a60697 100644
--- a/keyboards/pearlboards/zeus/config.h
+++ b/keyboards/pearlboards/zeus/config.h
@@ -26,12 +26,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
26#endif 26#endif
27 27
28/* Haptic feedback */ 28/* Haptic feedback */
29#define FB_ERM_LRA 0 29#define DRV2605L_FB_ERM_LRA 0
30#define FB_BRAKEFACTOR 1 // For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 30#define DRV2605L_FB_BRAKEFACTOR 1 // For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7
31#define FB_LOOPGAIN 3 // For Low:0, Medium:1, High:2, Very High:3 31#define DRV2605L_FB_LOOPGAIN 3 // For Low:0, Medium:1, High:2, Very High:3
32/* Motor settings */ 32/* Motor settings */
33#define RATED_VOLTAGE 2 33#define DRV2605L_RATED_VOLTAGE 2
34#define V_PEAK 5 34#define DRV2605L_V_PEAK 5
35 35
36/*== all animations enabled ==*/ 36/*== all animations enabled ==*/
37#define RGBLIGHT_EFFECT_ALTERNATING 37#define RGBLIGHT_EFFECT_ALTERNATING
diff --git a/keyboards/splitkb/zima/config.h b/keyboards/splitkb/zima/config.h
index b031fca8dd..b3393d3e23 100644
--- a/keyboards/splitkb/zima/config.h
+++ b/keyboards/splitkb/zima/config.h
@@ -27,13 +27,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
27#define RGBLIGHT_EFFECT_STATIC_GRADIENT 27#define RGBLIGHT_EFFECT_STATIC_GRADIENT
28#define RGBLIGHT_EFFECT_TWINKLE 28#define RGBLIGHT_EFFECT_TWINKLE
29 29
30#define FB_ERM_LRA 0 30#define DRV2605L_FB_ERM_LRA 0
31#define FB_BRAKEFACTOR 3 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */ 31#define DRV2605L_FB_BRAKEFACTOR 3 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */
32#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ 32#define DRV2605L_FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */
33 33
34/* Please refer to your datasheet for the optimal setting for your specific motor. */ 34/* Please refer to your datasheet for the optimal setting for your specific motor. */
35#define RATED_VOLTAGE 3 35#define DRV2605L_RATED_VOLTAGE 3
36#define V_PEAK 5 36#define DRV2605L_V_PEAK 5
37 37
38#define DRV2605L_GREETING alert_750ms 38#define DRV2605L_GREETING DRV2605L_EFFECT_750_MS_ALERT_100
39#define DRV2605L_DEFAULT_MODE buzz 39#define DRV2605L_DEFAULT_MODE DRV2605L_EFFECT_BUZZ_1_100
diff --git a/layouts/community/ortho_4x12/drashna/config.h b/layouts/community/ortho_4x12/drashna/config.h
index 071f7cb55b..7db0afa40f 100644
--- a/layouts/community/ortho_4x12/drashna/config.h
+++ b/layouts/community/ortho_4x12/drashna/config.h
@@ -105,49 +105,49 @@
105/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ 105/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
106//#define MIDI_TONE_KEYCODE_OCTAVES 2 106//#define MIDI_TONE_KEYCODE_OCTAVES 2
107 107
108#define FB_ERM_LRA 1 /* For ERM:0 or LRA:1*/ 108#define DRV2605L_FB_ERM_LRA 1 /* For ERM:0 or LRA:1*/
109#define FB_BRAKEFACTOR 6 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */ 109#define DRV2605L_FB_BRAKEFACTOR 6 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */
110#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ 110#define DRV2605L_FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */
111 111
112/* default 3V ERM vibration motor voltage and library*/ 112/* default 3V ERM vibration motor voltage and library*/
113#if FB_ERM_LRA == 0 113#if DRV2605L_FB_ERM_LRA == 0
114# define RATED_VOLTAGE 3 114# define DRV2605L_RATED_VOLTAGE 3
115# define V_RMS 2.3 115# define DRV2605L_V_RMS 2.3
116# define V_PEAK 3.30 116# define DRV2605L_V_PEAK 3.30
117/* Library Selection */ 117/* Library Selection */
118# define DRV2605L_LIBRARY 4 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */ 118# define DRV2605L_LIBRARY 4 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
119 119
120/* default 2V LRA voltage and library */ 120/* default 2V LRA voltage and library */
121#elif FB_ERM_LRA == 1 121#elif DRV2605L_FB_ERM_LRA == 1
122# define RATED_VOLTAGE 2 122# define DRV2605L_RATED_VOLTAGE 2
123# define V_RMS 2.0 123# define DRV2605L_V_RMS 2.0
124# define V_PEAK 2.85 124# define DRV2605L_V_PEAK 2.85
125# define F_LRA 200 125# define DRV2605L_F_LRA 200
126/* Library Selection */ 126/* Library Selection */
127# define DRV2605L_LIBRARY 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */ 127# define DRV2605L_LIBRARY 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
128 128
129#endif 129#endif
130 130
131/* Control 1 register settings */ 131/* Control 1 register settings */
132#define DRIVE_TIME 25 132#define DRV2605L_DRIVE_TIME 25
133#define AC_COUPLE 0 133#define DRV2605L_AC_COUPLE 0
134#define STARTUP_BOOST 1 134#define DRV2605L_STARTUP_BOOST 1
135 135
136/* Control 2 Settings */ 136/* Control 2 Settings */
137#define BIDIR_INPUT 1 137#define DRV2605L_BIDIR_INPUT 1
138#define BRAKE_STAB 1 /* Loopgain is reduced when braking is almost complete to improve stability */ 138#define DRV2605L_BRAKE_STAB 1 /* Loopgain is reduced when braking is almost complete to improve stability */
139#define SAMPLE_TIME 3 139#define DRV2605L_SAMPLE_TIME 3
140#define BLANKING_TIME 1 140#define DRV2605L_BLANKING_TIME 1
141#define IDISS_TIME 1 141#define DRV2605L_IDISS_TIME 1
142 142
143/* Control 3 settings */ 143/* Control 3 settings */
144#define NG_THRESH 2 144#define DRV2605L_NG_THRESH 2
145#define ERM_OPEN_LOOP 1 145#define DRV2605L_ERM_OPEN_LOOP 1
146#define SUPPLY_COMP_DIS 0 146#define DRV2605L_SUPPLY_COMP_DIS 0
147#define DATA_FORMAT_RTO 0 147#define DRV2605L_DATA_FORMAT_RTO 0
148#define LRA_DRIVE_MODE 0 148#define DRV2605L_LRA_DRIVE_MODE 0
149#define N_PWM_ANALOG 0 149#define DRV2605L_N_PWM_ANALOG 0
150#define LRA_OPEN_LOOP 0 150#define DRV2605L_LRA_OPEN_LOOP 0
151/* Control 4 settings */ 151/* Control 4 settings */
152#define ZC_DET_TIME 0 152#define DRV2605L_ZC_DET_TIME 0
153#define AUTO_CAL_TIME 3 153#define DRV2605L_AUTO_CAL_TIME 3
diff --git a/quantum/haptic.c b/quantum/haptic.c
index 13b2258eb8..5a700dca38 100644
--- a/quantum/haptic.c
+++ b/quantum/haptic.c
@@ -146,7 +146,7 @@ void haptic_buzz_toggle(void) {
146void haptic_mode_increase(void) { 146void haptic_mode_increase(void) {
147 uint8_t mode = haptic_config.mode + 1; 147 uint8_t mode = haptic_config.mode + 1;
148#ifdef HAPTIC_DRV2605L 148#ifdef HAPTIC_DRV2605L
149 if (haptic_config.mode >= drv_effect_max) { 149 if (haptic_config.mode >= DRV2605L_EFFECT_COUNT) {
150 mode = 1; 150 mode = 1;
151 } 151 }
152#endif 152#endif
@@ -157,7 +157,7 @@ void haptic_mode_decrease(void) {
157 uint8_t mode = haptic_config.mode - 1; 157 uint8_t mode = haptic_config.mode - 1;
158#ifdef HAPTIC_DRV2605L 158#ifdef HAPTIC_DRV2605L
159 if (haptic_config.mode < 1) { 159 if (haptic_config.mode < 1) {
160 mode = (drv_effect_max - 1); 160 mode = (DRV2605L_EFFECT_COUNT - 1);
161 } 161 }
162#endif 162#endif
163 haptic_set_mode(mode); 163 haptic_set_mode(mode);