~ruther/qmk_firmware

b090354143612d2c0f5c8629510542de5bd4e29e — Ryan 1 year, 10 months ago b20b360
haptic: naming cleanups (#21551)

51 files changed, 359 insertions(+), 352 deletions(-)

M builddefs/common_features.mk
M docs/feature_haptic_feedback.md
R drivers/haptic/{DRV2605L.c => drv2605l.c}
R drivers/haptic/{DRV2605L.h => drv2605l.h}
M keyboards/adpenrose/mine/keymaps/solenoid/rules.mk
M keyboards/adpenrose/shisaku/keymaps/solenoid/rules.mk
M keyboards/ai03/lunar_ii/rules.mk
M keyboards/boston_meetup/2019/config.h
M keyboards/boston_meetup/2019/rules.mk
M keyboards/buzzard/keymaps/crehmann/config.h
M keyboards/buzzard/keymaps/crehmann/features/haptic_utils.c
M keyboards/buzzard/keymaps/crehmann/rules.mk
M keyboards/buzzard/keymaps/default/config.h
M keyboards/buzzard/keymaps/default/rules.mk
M keyboards/buzzard/rev1/rev1.c
M keyboards/hadron/ver3/config.h
D keyboards/hadron/ver3/keymaps/ishtob/config.h
M keyboards/hadron/ver3/keymaps/ishtob/keymap.c
M keyboards/hadron/ver3/rules.mk
M keyboards/handwired/onekey/keymaps/haptic/rules.mk
M keyboards/handwired/swiftrax/bumblebee/keymaps/default/rules.mk
M keyboards/handwired/swiftrax/bumblebee/keymaps/via/rules.mk
M keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/config.h
M keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/rules.mk
M keyboards/hardwareabstraction/handwire/rules.mk
M keyboards/hillside/46/0_1/config.h
M keyboards/hillside/46/0_1/rules.mk
M keyboards/hillside/48/0_1/config.h
M keyboards/hillside/48/0_1/rules.mk
M keyboards/hillside/52/0_1/config.h
M keyboards/hillside/52/0_1/rules.mk
M keyboards/ibm/model_m_4th_gen/overnumpad_1xb/rules.mk
M keyboards/mechwild/clunker/rules.mk
M keyboards/pearlboards/atlas/rules.mk
M keyboards/pearlboards/pearl/rules.mk
M keyboards/pearlboards/zeus/rules.mk
M keyboards/splitkb/zima/config.h
M keyboards/splitkb/zima/rules.mk
M keyboards/unicomp/classic_ultracl_post_2013/overnumpad_1xb/rules.mk
M keyboards/unicomp/classic_ultracl_pre_2013/overnumpad_1xb/rules.mk
M keyboards/unicomp/pc122/overnumpad_1xb/rules.mk
M keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/rules.mk
M keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/rules.mk
M keyboards/vertex/angle65/rules.mk
M keyboards/xw60/rules.mk
M layouts/community/ortho_4x12/drashna/config.h
M quantum/haptic.c
M quantum/haptic.h
M quantum/process_keycode/process_space_cadet.c
M quantum/split_common/split_util.c
M users/ishtob/ishtob.h
M builddefs/common_features.mk => builddefs/common_features.mk +14 -9
@@ 721,18 721,23 @@ ifeq ($(strip $(FNV_ENABLE)), yes)
    SRC += qmk_fnv_type_validation.c hash_32a.c hash_64a.c
endif

VALID_HAPTIC_DRIVER_TYPES := drv2605l solenoid
ifeq ($(strip $(HAPTIC_ENABLE)),yes)
    COMMON_VPATH += $(DRIVER_PATH)/haptic
    ifeq ($(filter $(HAPTIC_DRIVER),$(VALID_HAPTIC_DRIVER_TYPES)),)
        $(call CATASTROPHIC_ERROR,Invalid HAPTIC_DRIVER,HAPTIC_DRIVER="$(HAPTIC_DRIVER)" is not a valid Haptic driver)
    else
        COMMON_VPATH += $(DRIVER_PATH)/haptic

    ifneq ($(filter DRV2605L, $(HAPTIC_DRIVER)), )
        SRC += DRV2605L.c
        QUANTUM_LIB_SRC += i2c_master.c
        OPT_DEFS += -DDRV2605L
    endif
        ifeq ($(strip $(HAPTIC_DRIVER)), drv2605l)
            SRC += drv2605l.c
            QUANTUM_LIB_SRC += i2c_master.c
            OPT_DEFS += -DHAPTIC_DRV2605L
        endif

    ifneq ($(filter SOLENOID, $(HAPTIC_DRIVER)), )
        SRC += solenoid.c
        OPT_DEFS += -DSOLENOID_ENABLE
        ifeq ($(strip $(HAPTIC_DRIVER)), solenoid)
            SRC += solenoid.c
            OPT_DEFS += -DHAPTIC_SOLENOID
        endif
    endif
endif


M docs/feature_haptic_feedback.md => docs/feature_haptic_feedback.md +10 -9
@@ 4,11 4,12 @@

The following options are currently available for haptic feedback in `rules.mk`:

```
```make
HAPTIC_ENABLE = yes

HAPTIC_DRIVER += DRV2605L
HAPTIC_DRIVER += SOLENOID
HAPTIC_DRIVER = drv2605l
# or
HAPTIC_DRIVER = solenoid
```

The following `config.h` settings are available for all types of haptic feedback:


@@ 92,7 93,7 @@ This driver supports 2 different feedback motors. Set the following in your `con

Eccentric 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.

```
```c
#define FB_ERM_LRA 0
#define FB_BRAKEFACTOR 3 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */
#define FB_LOOPGAIN 1 /* For  Low:0, Medium:1, High:2, Very High:3 */


@@ 105,7 106,7 @@ Eccentric Rotating Mass vibration motors (ERM) is motor with a off-set weight at

Linear 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.

``` 
```c
#define FB_ERM_LRA 1
#define FB_BRAKEFACTOR 3 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */
#define FB_LOOPGAIN 1 /* For  Low:0, Medium:1, High:2, Very High:3 */


@@ 170,13 171,13 @@ List of waveform sequences from the datasheet:
| 42  | lg_dblclick_med_80  | 84  | transition_rampup_med_smooth1     |     |                                      |
### Optional DRV2605L defines

```
#define DRV_GREETING *sequence name or number*
```c
#define DRV2605L_GREETING *sequence name or number*
```
If haptic feedback is enabled, the keyboard will vibrate to a specific sequence during startup. That can be selected using the following define:

```
#define DRV_MODE_DEFAULT *sequence name or number*
```c
#define DRV2605L_DEFAULT_MODE *sequence name or number*
```
This will set what sequence `HF_RST` will set as the active mode. If not defined, mode will be set to 1 when `HF_RST` is pressed.


R drivers/haptic/DRV2605L.c => drivers/haptic/drv2605l.c +48 -44
@@ 14,48 14,47 @@
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
#include "DRV2605L.h"
#include "print.h"
#include <stdlib.h>
#include <stdio.h>

#include "drv2605l.h"
#include "i2c_master.h"
#include <math.h>

uint8_t DRV2605L_transfer_buffer[2];
uint8_t DRV2605L_read_register;
uint8_t drv2605l_write_buffer[2];
uint8_t drv2605l_read_buffer;

void DRV_write(uint8_t drv_register, uint8_t settings) {
    DRV2605L_transfer_buffer[0] = drv_register;
    DRV2605L_transfer_buffer[1] = settings;
    i2c_transmit(DRV2605L_BASE_ADDRESS << 1, DRV2605L_transfer_buffer, 2, 100);
void drv2605l_write(uint8_t reg_addr, uint8_t data) {
    drv2605l_write_buffer[0] = reg_addr;
    drv2605l_write_buffer[1] = data;
    i2c_transmit(DRV2605L_I2C_ADDRESS << 1, drv2605l_write_buffer, 2, 100);
}

uint8_t DRV_read(uint8_t regaddress) {
    i2c_readReg(DRV2605L_BASE_ADDRESS << 1, regaddress, &DRV2605L_read_register, 1, 100);
uint8_t drv2605l_read(uint8_t reg_addr) {
    i2c_readReg(DRV2605L_I2C_ADDRESS << 1, reg_addr, &drv2605l_read_buffer, 1, 100);

    return DRV2605L_read_register;
    return drv2605l_read_buffer;
}

void DRV_init(void) {
void drv2605l_init(void) {
    i2c_init();
    /* 0x07 sets DRV2605 into calibration mode */
    DRV_write(DRV_MODE, 0x07);
    drv2605l_write(DRV2605L_REG_MODE, 0x07);

    //  DRV_write(DRV_FEEDBACK_CTRL,0xB6);
    //  drv2605l_write(DRV2605L_REG_FEEDBACK_CTRL,0xB6);

#if FB_ERM_LRA == 0
    /* ERM settings */
    DRV_write(DRV_RATED_VOLT, (RATED_VOLTAGE / 21.33) * 1000);
    drv2605l_write(DRV2605L_REG_RATED_VOLTAGE, (RATED_VOLTAGE / 21.33) * 1000);
#    if ERM_OPEN_LOOP == 0
    DRV_write(DRV_OVERDRIVE_CLAMP_VOLT, (((V_PEAK * (DRIVE_TIME + BLANKING_TIME + IDISS_TIME)) / 0.02133) / (DRIVE_TIME - 0.0003)));
    drv2605l_write(DRV2605L_REG_OVERDRIVE_CLAMP_VOLTAGE, (((V_PEAK * (DRIVE_TIME + BLANKING_TIME + IDISS_TIME)) / 0.02133) / (DRIVE_TIME - 0.0003)));
#    elif ERM_OPEN_LOOP == 1
    DRV_write(DRV_OVERDRIVE_CLAMP_VOLT, (V_PEAK / 0.02196));
    drv2605l_write(DRV2605L_REG_OVERDRIVE_CLAMP_VOLTAGE, (V_PEAK / 0.02196));
#    endif
#elif FB_ERM_LRA == 1
    DRV_write(DRV_RATED_VOLT, ((V_RMS * sqrt(1 - ((4 * ((150 + (SAMPLE_TIME * 50)) * 0.000001)) + 0.0003) * F_LRA) / 0.02071)));
    drv2605l_write(DRV2605L_REG_RATED_VOLTAGE, ((V_RMS * sqrt(1 - ((4 * ((150 + (SAMPLE_TIME * 50)) * 0.000001)) + 0.0003) * F_LRA) / 0.02071)));
#    if LRA_OPEN_LOOP == 0
    DRV_write(DRV_OVERDRIVE_CLAMP_VOLT, ((V_PEAK / sqrt(1 - (F_LRA * 0.0008)) / 0.02133)));
    drv2605l_write(DRV2605L_REG_OVERDRIVE_CLAMP_VOLTAGE, ((V_PEAK / sqrt(1 - (F_LRA * 0.0008)) / 0.02133)));
#    elif LRA_OPEN_LOOP == 1
    DRV_write(DRV_OVERDRIVE_CLAMP_VOLT, (V_PEAK / 0.02196));
    drv2605l_write(DRV2605L_REG_OVERDRIVE_CLAMP_VOLTAGE, (V_PEAK / 0.02196));
#    endif
#endif



@@ 64,19 63,22 @@ void DRV_init(void) {
    FB_SET.Bits.BRAKE_FACTOR = FB_BRAKEFACTOR;
    FB_SET.Bits.LOOP_GAIN    = FB_LOOPGAIN;
    FB_SET.Bits.BEMF_GAIN    = 0; /* auto-calibration populates this field*/
    DRV_write(DRV_FEEDBACK_CTRL, (uint8_t)FB_SET.Byte);
    drv2605l_write(DRV2605L_REG_FEEDBACK_CTRL, (uint8_t)FB_SET.Byte);

    DRVREG_CTRL1 C1_SET;
    C1_SET.Bits.C1_DRIVE_TIME    = DRIVE_TIME;
    C1_SET.Bits.C1_AC_COUPLE     = AC_COUPLE;
    C1_SET.Bits.C1_STARTUP_BOOST = STARTUP_BOOST;
    DRV_write(DRV_CTRL_1, (uint8_t)C1_SET.Byte);
    drv2605l_write(DRV2605L_REG_CTRL1, (uint8_t)C1_SET.Byte);

    DRVREG_CTRL2 C2_SET;
    C2_SET.Bits.C2_BIDIR_INPUT   = BIDIR_INPUT;
    C2_SET.Bits.C2_BRAKE_STAB    = BRAKE_STAB;
    C2_SET.Bits.C2_SAMPLE_TIME   = SAMPLE_TIME;
    C2_SET.Bits.C2_BLANKING_TIME = BLANKING_TIME;
    C2_SET.Bits.C2_IDISS_TIME    = IDISS_TIME;
    DRV_write(DRV_CTRL_2, (uint8_t)C2_SET.Byte);
    drv2605l_write(DRV2605L_REG_CTRL2, (uint8_t)C2_SET.Byte);

    DRVREG_CTRL3 C3_SET;
    C3_SET.Bits.C3_LRA_OPEN_LOOP   = LRA_OPEN_LOOP;
    C3_SET.Bits.C3_N_PWM_ANALOG    = N_PWM_ANALOG;


@@ 85,38 87,40 @@ void DRV_init(void) {
    C3_SET.Bits.C3_SUPPLY_COMP_DIS = SUPPLY_COMP_DIS;
    C3_SET.Bits.C3_ERM_OPEN_LOOP   = ERM_OPEN_LOOP;
    C3_SET.Bits.C3_NG_THRESH       = NG_THRESH;
    DRV_write(DRV_CTRL_3, (uint8_t)C3_SET.Byte);
    drv2605l_write(DRV2605L_REG_CTRL3, (uint8_t)C3_SET.Byte);

    DRVREG_CTRL4 C4_SET;
    C4_SET.Bits.C4_ZC_DET_TIME   = ZC_DET_TIME;
    C4_SET.Bits.C4_AUTO_CAL_TIME = AUTO_CAL_TIME;
    DRV_write(DRV_CTRL_4, (uint8_t)C4_SET.Byte);
    DRV_write(DRV_LIB_SELECTION, LIB_SELECTION);
    drv2605l_write(DRV2605L_REG_CTRL4, (uint8_t)C4_SET.Byte);

    drv2605l_write(DRV2605L_REG_LIBRARY_SELECTION, DRV2605L_LIBRARY);

    DRV_write(DRV_GO, 0x01);
    drv2605l_write(DRV2605L_REG_GO, 0x01);

    /* 0x00 sets DRV2605 out of standby and to use internal trigger
     * 0x01 sets DRV2605 out of standby and to use external trigger */
    DRV_write(DRV_MODE, 0x00);
    drv2605l_write(DRV2605L_REG_MODE, 0x00);

    // Play greeting sequence
    DRV_write(DRV_GO, 0x00);
    DRV_write(DRV_WAVEFORM_SEQ_1, DRV_GREETING);
    DRV_write(DRV_GO, 0x01);
    drv2605l_write(DRV2605L_REG_GO, 0x00);
    drv2605l_write(DRV2605L_REG_WAVEFORM_SEQUENCER_1, DRV2605L_GREETING);
    drv2605l_write(DRV2605L_REG_GO, 0x01);
}

void DRV_rtp_init(void) {
    DRV_write(DRV_GO, 0x00);
    DRV_write(DRV_RTP_INPUT, 20); // 20 is the lowest value I've found where haptics can still be felt.
    DRV_write(DRV_MODE, 0x05);
    DRV_write(DRV_GO, 0x01);
void drv2605l_rtp_init(void) {
    drv2605l_write(DRV2605L_REG_GO, 0x00);
    drv2605l_write(DRV2605L_REG_RTP_INPUT, 20); // 20 is the lowest value I've found where haptics can still be felt.
    drv2605l_write(DRV2605L_REG_MODE, 0x05);
    drv2605l_write(DRV2605L_REG_GO, 0x01);
}

void DRV_amplitude(uint8_t amplitude) {
    DRV_write(DRV_RTP_INPUT, amplitude);
void drv2605l_amplitude(uint8_t amplitude) {
    drv2605l_write(DRV2605L_REG_RTP_INPUT, amplitude);
}

void DRV_pulse(uint8_t sequence) {
    DRV_write(DRV_GO, 0x00);
    DRV_write(DRV_WAVEFORM_SEQ_1, sequence);
    DRV_write(DRV_GO, 0x01);
void drv2605l_pulse(uint8_t sequence) {
    drv2605l_write(DRV2605L_REG_GO, 0x00);
    drv2605l_write(DRV2605L_REG_WAVEFORM_SEQUENCER_1, sequence);
    drv2605l_write(DRV2605L_REG_GO, 0x01);
}

R drivers/haptic/DRV2605L.h => drivers/haptic/drv2605l.h +177 -176
@@ 16,7 16,8 @@
 */

#pragma once
#include "i2c_master.h"

#include <stdint.h>

/* Initialization settings



@@ 55,19 56,19 @@
#endif

/* Library Selection */
#ifndef LIB_SELECTION
#ifndef DRV2605L_LIBRARY
#    if FB_ERM_LRA == 1
#        define LIB_SELECTION 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
#        define DRV2605L_LIBRARY 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
#    else
#        define LIB_SELECTION 1
#        define DRV2605L_LIBRARY 1
#    endif
#endif

#ifndef DRV_GREETING
#    define DRV_GREETING alert_750ms
#ifndef DRV2605L_GREETING
#    define DRV2605L_GREETING alert_750ms
#endif
#ifndef DRV_MODE_DEFAULT
#    define DRV_MODE_DEFAULT strong_click1
#ifndef DRV2605L_DEFAULT_MODE
#    define DRV2605L_DEFAULT_MODE strong_click1
#endif

/* Control 1 register settings */


@@ 129,177 130,177 @@
#    define AUTO_CAL_TIME 3
#endif

/* register defines -------------------------------------------------------- */
#define DRV2605L_BASE_ADDRESS 0x5A /* DRV2605L Base address */
#define DRV_STATUS 0x00
#define DRV_MODE 0x01
#define DRV_RTP_INPUT 0x02
#define DRV_LIB_SELECTION 0x03
#define DRV_WAVEFORM_SEQ_1 0x04
#define DRV_WAVEFORM_SEQ_2 0x05
#define DRV_WAVEFORM_SEQ_3 0x06
#define DRV_WAVEFORM_SEQ_4 0x07
#define DRV_WAVEFORM_SEQ_5 0x08
#define DRV_WAVEFORM_SEQ_6 0x09
#define DRV_WAVEFORM_SEQ_7 0x0A
#define DRV_WAVEFORM_SEQ_8 0x0B
#define DRV_GO 0x0C
#define DRV_OVERDRIVE_TIME_OFFSET 0x0D
#define DRV_SUSTAIN_TIME_OFFSET_P 0x0E
#define DRV_SUSTAIN_TIME_OFFSET_N 0x0F
#define DRV_BRAKE_TIME_OFFSET 0x10
#define DRV_AUDIO_2_VIBE_CTRL 0x11
#define DRV_AUDIO_2_VIBE_MIN_IN 0x12
#define DRV_AUDIO_2_VIBE_MAX_IN 0x13
#define DRV_AUDIO_2_VIBE_MIN_OUTDRV 0x14
#define DRV_AUDIO_2_VIBE_MAX_OUTDRV 0x15
#define DRV_RATED_VOLT 0x16
#define DRV_OVERDRIVE_CLAMP_VOLT 0x17
#define DRV_AUTO_CALIB_COMP_RESULT 0x18
#define DRV_AUTO_CALIB_BEMF_RESULT 0x19
#define DRV_FEEDBACK_CTRL 0x1A
#define DRV_CTRL_1 0x1B
#define DRV_CTRL_2 0x1C
#define DRV_CTRL_3 0x1D
#define DRV_CTRL_4 0x1E
#define DRV_CTRL_5 0x1F
#define DRV_OPEN_LOOP_PERIOD 0x20
#define DRV_VBAT_VOLT_MONITOR 0x21
#define DRV_LRA_RESONANCE_PERIOD 0x22
#define DRV2605L_I2C_ADDRESS 0x5A

#define DRV2605L_REG_STATUS 0x00
#define DRV2605L_REG_MODE 0x01
#define DRV2605L_REG_RTP_INPUT 0x02
#define DRV2605L_REG_LIBRARY_SELECTION 0x03
#define DRV2605L_REG_WAVEFORM_SEQUENCER_1 0x04
#define DRV2605L_REG_WAVEFORM_SEQUENCER_2 0x05
#define DRV2605L_REG_WAVEFORM_SEQUENCER_3 0x06
#define DRV2605L_REG_WAVEFORM_SEQUENCER_4 0x07
#define DRV2605L_REG_WAVEFORM_SEQUENCER_5 0x08
#define DRV2605L_REG_WAVEFORM_SEQUENCER_6 0x09
#define DRV2605L_REG_WAVEFORM_SEQUENCER_7 0x0A
#define DRV2605L_REG_WAVEFORM_SEQUENCER_8 0x0B
#define DRV2605L_REG_GO 0x0C
#define DRV2605L_REG_OVERDRIVE_TIME_OFFSET 0x0D
#define DRV2605L_REG_SUSTAIN_TIME_OFFSET_P 0x0E
#define DRV2605L_REG_SUSTAIN_TIME_OFFSET_N 0x0F
#define DRV2605L_REG_BRAKE_TIME_OFFSET 0x10
#define DRV2605L_REG_AUDIO_TO_VIBE_CTRL 0x11
#define DRV2605L_REG_AUDIO_TO_VIBE_MIN_INPUT 0x12
#define DRV2605L_REG_AUDIO_TO_VIBE_MAX_INPUT 0x13
#define DRV2605L_REG_AUDIO_TO_VIBE_MIN_OUTPUT_DRIVE 0x14
#define DRV2605L_REG_AUDIO_TO_VIBE_MAX_OUTPUT_DRIVE 0x15
#define DRV2605L_REG_RATED_VOLTAGE 0x16
#define DRV2605L_REG_OVERDRIVE_CLAMP_VOLTAGE 0x17
#define DRV2605L_REG_AUTO_CALIBRATION_COMPENSATION_RESULT 0x18
#define DRV2605L_REG_AUTO_CALIBRATION_BACK_EMF_RESULT 0x19
#define DRV2605L_REG_FEEDBACK_CTRL 0x1A
#define DRV2605L_REG_CTRL1 0x1B
#define DRV2605L_REG_CTRL2 0x1C
#define DRV2605L_REG_CTRL3 0x1D
#define DRV2605L_REG_CTRL4 0x1E
#define DRV2605L_REG_CTRL5 0x1F
#define DRV2605L_REG_LRA_OPEN_LOOP_PERIOD 0x20
#define DRV2605L_REG_VBAT_VOLTAGE_MONITOR 0x21
#define DRV2605L_REG_LRA_RESONANCE_PERIOD 0x22

void    DRV_init(void);
void    DRV_write(const uint8_t drv_register, const uint8_t settings);
uint8_t DRV_read(const uint8_t regaddress);
void    DRV_rtp_init(void);
void    DRV_amplitude(const uint8_t amplitude);
void    DRV_pulse(const uint8_t sequence);
void    drv2605l_init(void);
void    drv2605l_write(const uint8_t reg_addr, const uint8_t data);
uint8_t drv2605l_read(const uint8_t reg_addr);
void    drv2605l_rtp_init(void);
void    drv2605l_amplitude(const uint8_t amplitude);
void    drv2605l_pulse(const uint8_t sequence);

typedef enum DRV_EFFECT {
    clear_sequence                       = 0,
    strong_click                         = 1,
    strong_click_60                      = 2,
    strong_click_30                      = 3,
    sharp_click                          = 4,
    sharp_click_60                       = 5,
    sharp_click_30                       = 6,
    soft_bump                            = 7,
    soft_bump_60                         = 8,
    soft_bump_30                         = 9,
    dbl_click                            = 10,
    dbl_click_60                         = 11,
    trp_click                            = 12,
    soft_fuzz                            = 13,
    strong_buzz                          = 14,
    alert_750ms                          = 15,
    alert_1000ms                         = 16,
    strong_click1                        = 17,
    strong_click2_80                     = 18,
    strong_click3_60                     = 19,
    strong_click4_30                     = 20,
    medium_click1                        = 21,
    medium_click2_80                     = 22,
    medium_click3_60                     = 23,
    sharp_tick1                          = 24,
    sharp_tick2_80                       = 25,
    sharp_tick3_60                       = 26,
    sh_dblclick_str                      = 27,
    sh_dblclick_str_80                   = 28,
    sh_dblclick_str_60                   = 29,
    sh_dblclick_str_30                   = 30,
    sh_dblclick_med                      = 31,
    sh_dblclick_med_80                   = 32,
    sh_dblclick_med_60                   = 33,
    sh_dblsharp_tick                     = 34,
    sh_dblsharp_tick_80                  = 35,
    sh_dblsharp_tick_60                  = 36,
    lg_dblclick_str                      = 37,
    lg_dblclick_str_80                   = 38,
    lg_dblclick_str_60                   = 39,
    lg_dblclick_str_30                   = 40,
    lg_dblclick_med                      = 41,
    lg_dblclick_med_80                   = 42,
    lg_dblclick_med_60                   = 43,
    lg_dblsharp_tick                     = 44,
    lg_dblsharp_tick_80                  = 45,
    lg_dblsharp_tick_60                  = 46,
    buzz                                 = 47,
    buzz_80                              = 48,
    buzz_60                              = 49,
    buzz_40                              = 50,
    buzz_20                              = 51,
    pulsing_strong                       = 52,
    pulsing_strong_80                    = 53,
    pulsing_medium                       = 54,
    pulsing_medium_80                    = 55,
    pulsing_sharp                        = 56,
    pulsing_sharp_80                     = 57,
    transition_click                     = 58,
    transition_click_80                  = 59,
    transition_click_60                  = 60,
    transition_click_40                  = 61,
    transition_click_20                  = 62,
    transition_click_10                  = 63,
    transition_hum                       = 64,
    transition_hum_80                    = 65,
    transition_hum_60                    = 66,
    transition_hum_40                    = 67,
    transition_hum_20                    = 68,
    transition_hum_10                    = 69,
    transition_rampdown_long_smooth1     = 70,
    transition_rampdown_long_smooth2     = 71,
    transition_rampdown_med_smooth1      = 72,
    transition_rampdown_med_smooth2      = 73,
    transition_rampdown_short_smooth1    = 74,
    transition_rampdown_short_smooth2    = 75,
    transition_rampdown_long_sharp1      = 76,
    transition_rampdown_long_sharp2      = 77,
    transition_rampdown_med_sharp1       = 78,
    transition_rampdown_med_sharp2       = 79,
    transition_rampdown_short_sharp1     = 80,
    transition_rampdown_short_sharp2     = 81,
    transition_rampup_long_smooth1       = 82,
    transition_rampup_long_smooth2       = 83,
    transition_rampup_med_smooth1        = 84,
    transition_rampup_med_smooth2        = 85,
    transition_rampup_short_smooth1      = 86,
    transition_rampup_short_smooth2      = 87,
    transition_rampup_long_sharp1        = 88,
    transition_rampup_long_sharp2        = 89,
    transition_rampup_med_sharp1         = 90,
    transition_rampup_med_sharp2         = 91,
    transition_rampup_short_sharp1       = 92,
    transition_rampup_short_sharp2       = 93,
    transition_rampdown_long_smooth1_50  = 94,
    transition_rampdown_long_smooth2_50  = 95,
    transition_rampdown_med_smooth1_50   = 96,
    transition_rampdown_med_smooth2_50   = 97,
    transition_rampdown_short_smooth1_50 = 98,
    transition_rampdown_short_smooth2_50 = 99,
    transition_rampdown_long_sharp1_50   = 100,
    transition_rampdown_long_sharp2_50   = 101,
    transition_rampdown_med_sharp1_50    = 102,
    transition_rampdown_med_sharp2_50    = 103,
    transition_rampdown_short_sharp1_50  = 104,
    transition_rampdown_short_sharp2_50  = 105,
    transition_rampup_long_smooth1_50    = 106,
    transition_rampup_long_smooth2_50    = 107,
    transition_rampup_med_smooth1_50     = 108,
    transition_rampup_med_smooth2_50     = 109,
    transition_rampup_short_smooth1_50   = 110,
    transition_rampup_short_smooth2_50   = 111,
    transition_rampup_long_sharp1_50     = 112,
    transition_rampup_long_sharp2_50     = 113,
    transition_rampup_med_sharp1_50      = 114,
    transition_rampup_med_sharp2_50      = 115,
    transition_rampup_short_sharp1_50    = 116,
    transition_rampup_short_sharp2_50    = 117,
    long_buzz_for_programmatic_stopping  = 118,
    smooth_hum1_50                       = 119,
    smooth_hum2_40                       = 120,
    smooth_hum3_30                       = 121,
    smooth_hum4_20                       = 122,
    smooth_hum5_10                       = 123,
    drv_effect_max                       = 124,
    clear_sequence,
    strong_click,
    strong_click_60,
    strong_click_30,
    sharp_click,
    sharp_click_60,
    sharp_click_30,
    soft_bump,
    soft_bump_60,
    soft_bump_30,
    dbl_click,
    dbl_click_60,
    trp_click,
    soft_fuzz,
    strong_buzz,
    alert_750ms,
    alert_1000ms,
    strong_click1,
    strong_click2_80,
    strong_click3_60,
    strong_click4_30,
    medium_click1,
    medium_click2_80,
    medium_click3_60,
    sharp_tick1,
    sharp_tick2_80,
    sharp_tick3_60,
    sh_dblclick_str,
    sh_dblclick_str_80,
    sh_dblclick_str_60,
    sh_dblclick_str_30,
    sh_dblclick_med,
    sh_dblclick_med_80,
    sh_dblclick_med_60,
    sh_dblsharp_tick,
    sh_dblsharp_tick_80,
    sh_dblsharp_tick_60,
    lg_dblclick_str,
    lg_dblclick_str_80,
    lg_dblclick_str_60,
    lg_dblclick_str_30,
    lg_dblclick_med,
    lg_dblclick_med_80,
    lg_dblclick_med_60,
    lg_dblsharp_tick,
    lg_dblsharp_tick_80,
    lg_dblsharp_tick_60,
    buzz,
    buzz_80,
    buzz_60,
    buzz_40,
    buzz_20,
    pulsing_strong,
    pulsing_strong_80,
    pulsing_medium,
    pulsing_medium_80,
    pulsing_sharp,
    pulsing_sharp_80,
    transition_click,
    transition_click_80,
    transition_click_60,
    transition_click_40,
    transition_click_20,
    transition_click_10,
    transition_hum,
    transition_hum_80,
    transition_hum_60,
    transition_hum_40,
    transition_hum_20,
    transition_hum_10,
    transition_rampdown_long_smooth1,
    transition_rampdown_long_smooth2,
    transition_rampdown_med_smooth1,
    transition_rampdown_med_smooth2,
    transition_rampdown_short_smooth1,
    transition_rampdown_short_smooth2,
    transition_rampdown_long_sharp1,
    transition_rampdown_long_sharp2,
    transition_rampdown_med_sharp1,
    transition_rampdown_med_sharp2,
    transition_rampdown_short_sharp1,
    transition_rampdown_short_sharp2,
    transition_rampup_long_smooth1,
    transition_rampup_long_smooth2,
    transition_rampup_med_smooth1,
    transition_rampup_med_smooth2,
    transition_rampup_short_smooth1,
    transition_rampup_short_smooth2,
    transition_rampup_long_sharp1,
    transition_rampup_long_sharp2,
    transition_rampup_med_sharp1,
    transition_rampup_med_sharp2,
    transition_rampup_short_sharp1,
    transition_rampup_short_sharp2,
    transition_rampdown_long_smooth1_50,
    transition_rampdown_long_smooth2_50,
    transition_rampdown_med_smooth1_50,
    transition_rampdown_med_smooth2_50,
    transition_rampdown_short_smooth1_50,
    transition_rampdown_short_smooth2_50,
    transition_rampdown_long_sharp1_50,
    transition_rampdown_long_sharp2_50,
    transition_rampdown_med_sharp1_50,
    transition_rampdown_med_sharp2_50,
    transition_rampdown_short_sharp1_50,
    transition_rampdown_short_sharp2_50,
    transition_rampup_long_smooth1_50,
    transition_rampup_long_smooth2_50,
    transition_rampup_med_smooth1_50,
    transition_rampup_med_smooth2_50,
    transition_rampup_short_smooth1_50,
    transition_rampup_short_smooth2_50,
    transition_rampup_long_sharp1_50,
    transition_rampup_long_sharp2_50,
    transition_rampup_med_sharp1_50,
    transition_rampup_med_sharp2_50,
    transition_rampup_short_sharp1_50,
    transition_rampup_short_sharp2_50,
    long_buzz_for_programmatic_stopping,
    smooth_hum1_50,
    smooth_hum2_40,
    smooth_hum3_30,
    smooth_hum4_20,
    smooth_hum5_10,
    drv_effect_max
} DRV_EFFECT;

/* Register bit array unions */

M keyboards/adpenrose/mine/keymaps/solenoid/rules.mk => keyboards/adpenrose/mine/keymaps/solenoid/rules.mk +1 -1
@@ 1,4 1,4 @@
VIA_ENABLE = yes
HAPTIC_ENABLE = yes
HAPTIC_DRIVER += SOLENOID
HAPTIC_DRIVER = solenoid
ENCODER_MAP_ENABLE = yes	# Encoder mapping functionality
\ No newline at end of file

M keyboards/adpenrose/shisaku/keymaps/solenoid/rules.mk => keyboards/adpenrose/shisaku/keymaps/solenoid/rules.mk +1 -1
@@ 1,4 1,4 @@
VIA_ENABLE = yes
LTO_ENABLE = yes
HAPTIC_ENABLE = yes
HAPTIC_DRIVER += SOLENOID
\ No newline at end of file
HAPTIC_DRIVER = solenoid
\ No newline at end of file

M keyboards/ai03/lunar_ii/rules.mk => keyboards/ai03/lunar_ii/rules.mk +1 -1
@@ 12,4 12,4 @@ RGBLIGHT_ENABLE = no        # Enable keyboard RGB underglow
AUDIO_ENABLE = no           # Audio output

HAPTIC_ENABLE = yes         # Enable solenoid support
HAPTIC_DRIVER += SOLENOID
HAPTIC_DRIVER = solenoid

M keyboards/boston_meetup/2019/config.h => keyboards/boston_meetup/2019/config.h +2 -2
@@ 48,7 48,7 @@
#define V_RMS 2.3
#define V_PEAK 3.30
/* Library Selection */
#define LIB_SELECTION 4 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
#define DRV2605L_LIBRARY 4 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */

/* default 2V LRA voltage and library */
#elif FB_ERM_LRA == 1


@@ 57,7 57,7 @@
#define V_PEAK 2.85
#define F_LRA 200
/* Library Selection */
#define LIB_SELECTION 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
#define DRV2605L_LIBRARY 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */

#endif


M keyboards/boston_meetup/2019/rules.mk => keyboards/boston_meetup/2019/rules.mk +1 -1
@@ 12,6 12,6 @@ AUDIO_ENABLE = yes          # Audio output
RGBLIGHT_ENABLE = no
RGB_MATRIX_ENABLE = no
HAPTIC_ENABLE = yes
HAPTIC_DRIVER = DRV2605L
HAPTIC_DRIVER = drv2605l
OLED_ENABLE = yes
OLED_DRIVER = SSD1306

M keyboards/buzzard/keymaps/crehmann/config.h => keyboards/buzzard/keymaps/crehmann/config.h +2 -2
@@ 25,8 25,8 @@
#define NO_HAPTIC_PUNCTUATION
#define NO_HAPTIC_NAV 
#define NO_HAPTIC_NUMERIC
#define DRV_GREETING       alert_750ms
#define DRV_MODE_DEFAULT   sharp_tick1
#define DRV2605L_GREETING       alert_750ms
#define DRV2605L_DEFAULT_MODE   sharp_tick1
#endif

#ifdef PS2_MOUSE_ENABLE

M keyboards/buzzard/keymaps/crehmann/features/haptic_utils.c => keyboards/buzzard/keymaps/crehmann/features/haptic_utils.c +6 -6
@@ 4,7 4,7 @@
#include "haptic_utils.h"

#ifdef HAPTIC_ENABLE
#include "drivers/haptic/DRV2605L.h"
#include "drivers/haptic/drv2605l.h"
#endif

#ifdef HAPTIC_ENABLE


@@ 23,19 23,19 @@ void process_layer_pulse(layer_state_t state) {
#ifdef HAPTIC_ENABLE
    switch (get_highest_layer(state)) {
        case 1:
            DRV_pulse(soft_bump);
            drv2605l_pulse(soft_bump);
            break;
        case 2:
            DRV_pulse(sh_dblsharp_tick);
            drv2605l_pulse(sh_dblsharp_tick);
            break;
        case 3:
            DRV_pulse(lg_dblclick_str);
            drv2605l_pulse(lg_dblclick_str);
            break;
        case 4:
            DRV_pulse(soft_bump);
            drv2605l_pulse(soft_bump);
            break;
        case 5:
            DRV_pulse(pulsing_sharp);
            drv2605l_pulse(pulsing_sharp);
            break;
    }
#endif

M keyboards/buzzard/keymaps/crehmann/rules.mk => keyboards/buzzard/keymaps/crehmann/rules.mk +1 -1
@@ 3,7 3,7 @@ SRC += features/haptic_utils.c
OLED_ENABLE = yes		

HAPTIC_ENABLE = yes
HAPTIC_DRIVER = DRV2605L
HAPTIC_DRIVER = drv2605l

PS2_MOUSE_ENABLE = yes	
MOUSEKEY_ENABLE = yes

M keyboards/buzzard/keymaps/default/config.h => keyboards/buzzard/keymaps/default/config.h +2 -2
@@ 25,8 25,8 @@
#define NO_HAPTIC_PUNCTUATION
#define NO_HAPTIC_NAV 
#define NO_HAPTIC_NUMERIC
#define DRV_GREETING       alert_750ms
#define DRV_MODE_DEFAULT   sharp_tick1
#define DRV2605L_GREETING       alert_750ms
#define DRV2605L_DEFAULT_MODE   sharp_tick1
#endif



M keyboards/buzzard/keymaps/default/rules.mk => keyboards/buzzard/keymaps/default/rules.mk +1 -1
@@ 1,7 1,7 @@
OLED_ENABLE = yes				# uncomment if you are using an OLED display

#HAPTIC_ENABLE = yes			# uncomment only on the master side if you are using a Pimoroni haptic buzz
#HAPTIC_DRIVER = DRV2605L		# uncomment only on the master side if you are using a Pimoroni haptic buzz
#HAPTIC_DRIVER = drv2605l		# uncomment only on the master side if you are using a Pimoroni haptic buzz

#PS2_MOUSE_ENABLE = yes			# uncomment only on the master side if you are usin a TrackPoint
MOUSEKEY_ENABLE = yes
\ No newline at end of file

M keyboards/buzzard/rev1/rev1.c => keyboards/buzzard/rev1/rev1.c +6 -6
@@ 3,7 3,7 @@
#include "quantum.h"

#ifdef HAPTIC_ENABLE
#include "drivers/haptic/DRV2605L.h"
#include "drivers/haptic/drv2605l.h"
#endif

#ifdef SWAP_HANDS_ENABLE


@@ 100,27 100,27 @@ __attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) {
    switch (get_highest_layer(state)) {
        case 1:
#ifdef HAPTIC_ENABLE
            DRV_pulse(soft_bump);
            drv2605l_pulse(soft_bump);
#endif
            break;
        case 2:
#ifdef HAPTIC_ENABLE
            DRV_pulse(sh_dblsharp_tick);
            drv2605l_pulse(sh_dblsharp_tick);
#endif
            break;
        case 3:
#ifdef HAPTIC_ENABLE
            DRV_pulse(lg_dblclick_str);
            drv2605l_pulse(lg_dblclick_str);
#endif
            break;
        case 4:
#ifdef HAPTIC_ENABLE
            DRV_pulse(soft_bump);
            drv2605l_pulse(soft_bump);
#endif
            break;
        case 5:
#ifdef HAPTIC_ENABLE
            DRV_pulse(pulsing_sharp);
            drv2605l_pulse(pulsing_sharp);
#endif
            break;
    }

M keyboards/hadron/ver3/config.h => keyboards/hadron/ver3/config.h +2 -2
@@ 70,7 70,7 @@
#define V_RMS 2.3
#define V_PEAK 3.30
/* Library Selection */
#define LIB_SELECTION 4 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
#define DRV2605L_LIBRARY 4 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */

/* default 2V LRA voltage and library */
#elif FB_ERM_LRA == 1


@@ 79,7 79,7 @@
#define V_PEAK 2.85
#define F_LRA 200
/* Library Selection */
#define LIB_SELECTION 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
#define DRV2605L_LIBRARY 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */

#endif


D keyboards/hadron/ver3/keymaps/ishtob/config.h => keyboards/hadron/ver3/keymaps/ishtob/config.h +0 -1
@@ 1,1 0,0 @@
#pragma once

M keyboards/hadron/ver3/keymaps/ishtob/keymap.c => keyboards/hadron/ver3/keymaps/ishtob/keymap.c +0 -9
@@ 239,12 239,3 @@ bool music_mask_user(uint16_t keycode) {
      return true;
  }
}


void matrix_init_keymap(void) {
}


void matrix_scan_keymap(void) {
}


M keyboards/hadron/ver3/rules.mk => keyboards/hadron/ver3/rules.mk +1 -1
@@ 12,7 12,7 @@ AUDIO_ENABLE = yes
RGBLIGHT_ENABLE = yes
RGB_MATRIX_ENABLE = no # once arm_rgb is implemented
HAPTIC_ENABLE = yes
HAPTIC_DRIVER = DRV2605L
HAPTIC_DRIVER = drv2605l
OLED_ENABLE = yes
OLED_DRIVER = SSD1306
ENCODER_ENABLER = yes

M keyboards/handwired/onekey/keymaps/haptic/rules.mk => keyboards/handwired/onekey/keymaps/haptic/rules.mk +1 -1
@@ 1,2 1,2 @@
HAPTIC_ENABLE = yes
HAPTIC_DRIVER = SOLENOID
HAPTIC_DRIVER = solenoid

M keyboards/handwired/swiftrax/bumblebee/keymaps/default/rules.mk => keyboards/handwired/swiftrax/bumblebee/keymaps/default/rules.mk +0 -1
@@ 1,2 1,1 @@
AUDIO_ENABLE = yes
HAPTIC_ENABLE += SOLENOID
\ No newline at end of file

M keyboards/handwired/swiftrax/bumblebee/keymaps/via/rules.mk => keyboards/handwired/swiftrax/bumblebee/keymaps/via/rules.mk +0 -1
@@ 1,5 1,4 @@
VIA_ENABLE = yes
#HAPTIC_ENABLE += SOLENOID
AUDIO_ENABLE = yes
#either solenoid or audio not both can be enabled
LTO_ENABLE = yes

M keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/config.h => keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/config.h +2 -2
@@ 32,5 32,5 @@


#define FB_ERM_LRA         0
#define DRV_GREETING       alert_750ms
#define DRV_MODE_DEFAULT   buzz
#define DRV2605L_GREETING       alert_750ms
#define DRV2605L_DEFAULT_MODE   buzz

M keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/rules.mk => keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/rules.mk +1 -1
@@ 35,7 35,7 @@ ifeq ($(strip $(KEYBOARD)), handwired/tractyl_manuform/5x6_right/f411)
    LTO_SUPPORTED                    = no
    OVERLOAD_FEATURES                = yes
    HAPTIC_ENABLE                    = yes
    HAPTIC_DRIVER                    = DRV2605L
    HAPTIC_DRIVER                    = drv2605l
endif

ifeq ($(strip $(OVERLOAD_FEATURES)), yes)

M keyboards/hardwareabstraction/handwire/rules.mk => keyboards/hardwareabstraction/handwire/rules.mk +1 -1
@@ 1,6 1,6 @@
LTO_ENABLE = yes
HAPTIC_ENABLE = yes
HAPTIC_DRIVER += SOLENOID
HAPTIC_DRIVER = solenoid

OLED_ENABLE = yes
OLED_DRIVER = SSD1306

M keyboards/hillside/46/0_1/config.h => keyboards/hillside/46/0_1/config.h +2 -2
@@ 21,5 21,5 @@

/* Haptic waveforms */
// Two mild waveforms
#define DRV_GREETING alert_750ms
#define DRV_MODE_DEFAULT sharp_tick3_60
#define DRV2605L_GREETING alert_750ms
#define DRV2605L_DEFAULT_MODE sharp_tick3_60

M keyboards/hillside/46/0_1/rules.mk => keyboards/hillside/46/0_1/rules.mk +1 -1
@@ 5,4 5,4 @@ LTO_ENABLE = yes            # Use link time optimization for smaller firmware
# enable it and set its driver here or in your keymap folder
# The Pimoroni board's driver is DRV2605L 
# HAPTIC_ENABLE = yes        # Enable haptic driver
# HAPTIC_DRIVER = DRV2605L
# HAPTIC_DRIVER = drv2605l

M keyboards/hillside/48/0_1/config.h => keyboards/hillside/48/0_1/config.h +2 -2
@@ 16,5 16,5 @@

/* Haptic waveforms */
// Two mild waveforms
#define DRV_GREETING alert_750ms
#define DRV_MODE_DEFAULT sharp_tick3_60
#define DRV2605L_GREETING alert_750ms
#define DRV2605L_DEFAULT_MODE sharp_tick3_60

M keyboards/hillside/48/0_1/rules.mk => keyboards/hillside/48/0_1/rules.mk +1 -1
@@ 5,4 5,4 @@ LTO_ENABLE = yes            # Use link time optimization for smaller firmware
# enable it and set its driver here or in your keymap folder
# The Pimoroni board's driver is DRV2605L 
# HAPTIC_ENABLE = yes        # Enable haptic driver
# HAPTIC_DRIVER = DRV2605L
# HAPTIC_DRIVER = drv2605l

M keyboards/hillside/52/0_1/config.h => keyboards/hillside/52/0_1/config.h +2 -2
@@ 21,5 21,5 @@

/* Haptic waveforms */
// Two mild waveforms
#define DRV_GREETING alert_750ms
#define DRV_MODE_DEFAULT sharp_tick3_60
#define DRV2605L_GREETING alert_750ms
#define DRV2605L_DEFAULT_MODE sharp_tick3_60

M keyboards/hillside/52/0_1/rules.mk => keyboards/hillside/52/0_1/rules.mk +1 -1
@@ 5,4 5,4 @@ LTO_ENABLE = yes            # Use link time optimization for smaller firmware
# enable it and set its driver here or in your keymap folder
# The Pimoroni board's driver is DRV2605L 
# HAPTIC_ENABLE = yes        # Enable haptic driver
# HAPTIC_DRIVER = DRV2605L
# HAPTIC_DRIVER = drv2605l

M keyboards/ibm/model_m_4th_gen/overnumpad_1xb/rules.mk => keyboards/ibm/model_m_4th_gen/overnumpad_1xb/rules.mk +1 -1
@@ 14,4 14,4 @@ AUDIO_ENABLE = no           # Audio output
KEYBOARD_SHARED_EP = yes    # Free up some extra endpoints - needed if console+mouse+extra

HAPTIC_ENABLE = yes
HAPTIC_DRIVER = SOLENOID
HAPTIC_DRIVER = solenoid

M keyboards/mechwild/clunker/rules.mk => keyboards/mechwild/clunker/rules.mk +1 -1
@@ 1,1 1,1 @@
HAPTIC_DRIVER += SOLENOID
HAPTIC_DRIVER = solenoid

M keyboards/pearlboards/atlas/rules.mk => keyboards/pearlboards/atlas/rules.mk +1 -1
@@ 12,6 12,6 @@ RGBLIGHT_ENABLE = yes       # Enable keyboard RGB underglow
AUDIO_ENABLE = yes          # Audio output
ENCODER_ENABLE = yes
HAPTIC_ENABLE = yes
HAPTIC_DRIVER = DRV2605L
HAPTIC_DRIVER = drv2605l

LTO_ENABLE = yes

M keyboards/pearlboards/pearl/rules.mk => keyboards/pearlboards/pearl/rules.mk +1 -1
@@ 11,6 11,6 @@ BACKLIGHT_ENABLE = no       # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes       # Enable keyboard RGB underglow
AUDIO_ENABLE = yes          # Audio output
HAPTIC_ENABLE = yes
HAPTIC_DRIVER = DRV2605L
HAPTIC_DRIVER = drv2605l

LTO_ENABLE = yes

M keyboards/pearlboards/zeus/rules.mk => keyboards/pearlboards/zeus/rules.mk +1 -1
@@ 12,6 12,6 @@ RGBLIGHT_ENABLE = yes       # Enable keyboard RGB underglow
AUDIO_ENABLE = yes          # Audio output
ENCODER_ENABLE = yes        # Rotary encoder
HAPTIC_ENABLE = yes         # Rumble feefback
HAPTIC_DRIVER = DRV2605L    # Rumble motor
HAPTIC_DRIVER = drv2605l    # Rumble motor

LTO_ENABLE = yes            # Link time optimization

M keyboards/splitkb/zima/config.h => keyboards/splitkb/zima/config.h +2 -2
@@ 35,5 35,5 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
#define RATED_VOLTAGE      3
#define V_PEAK             5

#define DRV_GREETING       alert_750ms
#define DRV_MODE_DEFAULT   buzz
#define DRV2605L_GREETING       alert_750ms
#define DRV2605L_DEFAULT_MODE   buzz

M keyboards/splitkb/zima/rules.mk => keyboards/splitkb/zima/rules.mk +1 -1
@@ 15,6 15,6 @@ ENCODER_ENABLE = yes       # ENables the use of one or more encoders
OLED_ENABLE = yes
OLED_DRIVER = SSD1306      # Enables the use of OLED displays
HAPTIC_ENABLE = yes        # Supported but not included by defaut
HAPTIC_DRIVER = DRV2605L
HAPTIC_DRIVER = drv2605l

LTO_ENABLE = yes

M keyboards/unicomp/classic_ultracl_post_2013/overnumpad_1xb/rules.mk => keyboards/unicomp/classic_ultracl_post_2013/overnumpad_1xb/rules.mk +1 -1
@@ 14,4 14,4 @@ AUDIO_ENABLE = no           # Audio output
KEYBOARD_SHARED_EP = yes    # Free up some extra endpoints - needed if console+mouse+extra

HAPTIC_ENABLE = yes
HAPTIC_DRIVER = SOLENOID
HAPTIC_DRIVER = solenoid

M keyboards/unicomp/classic_ultracl_pre_2013/overnumpad_1xb/rules.mk => keyboards/unicomp/classic_ultracl_pre_2013/overnumpad_1xb/rules.mk +1 -1
@@ 14,4 14,4 @@ AUDIO_ENABLE = no           # Audio output
KEYBOARD_SHARED_EP = yes    # Free up some extra endpoints - needed if console+mouse+extra

HAPTIC_ENABLE = yes
HAPTIC_DRIVER = SOLENOID
HAPTIC_DRIVER = solenoid

M keyboards/unicomp/pc122/overnumpad_1xb/rules.mk => keyboards/unicomp/pc122/overnumpad_1xb/rules.mk +1 -1
@@ 14,4 14,4 @@ AUDIO_ENABLE = no           # Audio output
KEYBOARD_SHARED_EP = yes    # Free up some extra endpoints - needed if console+mouse+extra

HAPTIC_ENABLE = yes
HAPTIC_DRIVER = SOLENOID
HAPTIC_DRIVER = solenoid

M keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/rules.mk => keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/rules.mk +1 -1
@@ 14,4 14,4 @@ AUDIO_ENABLE = no           # Audio output
KEYBOARD_SHARED_EP = yes    # Free up some extra endpoints - needed if console+mouse+extra

HAPTIC_ENABLE = yes
HAPTIC_DRIVER = SOLENOID
HAPTIC_DRIVER = solenoid

M keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/rules.mk => keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/rules.mk +1 -1
@@ 14,4 14,4 @@ AUDIO_ENABLE = no           # Audio output
KEYBOARD_SHARED_EP = yes    # Free up some extra endpoints - needed if console+mouse+extra

HAPTIC_ENABLE = yes
HAPTIC_DRIVER = SOLENOID
HAPTIC_DRIVER = solenoid

M keyboards/vertex/angle65/rules.mk => keyboards/vertex/angle65/rules.mk +1 -1
@@ 12,4 12,4 @@ RGBLIGHT_ENABLE = yes       # Enable keyboard RGB underglow
AUDIO_ENABLE = no           # Audio output

HAPTIC_ENABLE = yes
HAPTIC_DRIVER += SOLENOID
HAPTIC_DRIVER = solenoid

M keyboards/xw60/rules.mk => keyboards/xw60/rules.mk +1 -1
@@ 11,4 11,4 @@ BACKLIGHT_ENABLE = no       # Enable keyboard backlight functionality
AUDIO_ENABLE = no           # Audio output
RGBLIGHT_ENABLE = no        # Enable WS2812 RGB underlight.
HAPTIC_ENABLE = yes
HAPTIC_DRIVER = SOLENOID
HAPTIC_DRIVER = solenoid

M layouts/community/ortho_4x12/drashna/config.h => layouts/community/ortho_4x12/drashna/config.h +2 -2
@@ 115,7 115,7 @@
#    define V_RMS 2.3
#    define V_PEAK 3.30
/* Library Selection */
#    define LIB_SELECTION 4 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
#    define DRV2605L_LIBRARY 4 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */

/* default 2V LRA voltage and library */
#elif FB_ERM_LRA == 1


@@ 124,7 124,7 @@
#    define V_PEAK 2.85
#    define F_LRA 200
/* Library Selection */
#    define LIB_SELECTION 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
#    define DRV2605L_LIBRARY 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */

#endif


M quantum/haptic.c => quantum/haptic.c +42 -39
@@ 14,17 14,20 @@
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include "haptic.h"
#include "eeconfig.h"
#include "debug.h"
#include "usb_device_state.h"
#include "gpio.h"
#ifdef DRV2605L
#    include "DRV2605L.h"

#ifdef HAPTIC_DRV2605L
#    include "drv2605l.h"
#endif
#ifdef SOLENOID_ENABLE
#ifdef HAPTIC_SOLENOID
#    include "solenoid.h"
#endif

#if defined(SPLIT_KEYBOARD) && defined(SPLIT_HAPTIC_ENABLE)
extern uint8_t split_haptic_play;
#endif


@@ 59,11 62,11 @@ void haptic_init(void) {
        eeconfig_init();
    }
    haptic_config.raw = eeconfig_read_haptic();
#ifdef SOLENOID_ENABLE
#ifdef HAPTIC_SOLENOID
    solenoid_set_dwell(haptic_config.dwell);
#endif
    if ((haptic_config.raw == 0)
#ifdef SOLENOID_ENABLE
#ifdef HAPTIC_SOLENOID
        || (haptic_config.dwell == 0)
#endif
    ) {


@@ 77,12 80,12 @@ void haptic_init(void) {
        // This is to execute any side effects of the configuration.
        set_haptic_config_enable(haptic_config.enable);
    }
#ifdef SOLENOID_ENABLE
#ifdef HAPTIC_SOLENOID
    solenoid_setup();
    dprintf("Solenoid driver initialized\n");
#endif
#ifdef DRV2605L
    DRV_init();
#ifdef HAPTIC_DRV2605L
    drv2605l_init();
    dprintf("DRV2605 driver initialized\n");
#endif
    eeconfig_debug_haptic();


@@ 95,7 98,7 @@ void haptic_init(void) {
}

void haptic_task(void) {
#ifdef SOLENOID_ENABLE
#ifdef HAPTIC_SOLENOID
    solenoid_check();
#endif
}


@@ 108,13 111,13 @@ void eeconfig_debug_haptic(void) {

void haptic_enable(void) {
    set_haptic_config_enable(true);
    xprintf("haptic_config.enable = %u\n", haptic_config.enable);
    dprintf("haptic_config.enable = %u\n", haptic_config.enable);
    eeconfig_update_haptic(haptic_config.raw);
}

void haptic_disable(void) {
    set_haptic_config_enable(false);
    xprintf("haptic_config.enable = %u\n", haptic_config.enable);
    dprintf("haptic_config.enable = %u\n", haptic_config.enable);
    eeconfig_update_haptic(haptic_config.raw);
}



@@ 130,7 133,7 @@ void haptic_toggle(void) {
void haptic_feedback_toggle(void) {
    haptic_config.feedback++;
    if (haptic_config.feedback >= HAPTIC_FEEDBACK_MAX) haptic_config.feedback = KEY_PRESS;
    xprintf("haptic_config.feedback = %u\n", !haptic_config.feedback);
    dprintf("haptic_config.feedback = %u\n", !haptic_config.feedback);
    eeconfig_update_haptic(haptic_config.raw);
}



@@ 142,7 145,7 @@ void haptic_buzz_toggle(void) {

void haptic_mode_increase(void) {
    uint8_t mode = haptic_config.mode + 1;
#ifdef DRV2605L
#ifdef HAPTIC_DRV2605L
    if (haptic_config.mode >= drv_effect_max) {
        mode = 1;
    }


@@ 152,7 155,7 @@ void haptic_mode_increase(void) {

void haptic_mode_decrease(void) {
    uint8_t mode = haptic_config.mode - 1;
#ifdef DRV2605L
#ifdef HAPTIC_DRV2605L
    if (haptic_config.mode < 1) {
        mode = (drv_effect_max - 1);
    }


@@ 161,7 164,7 @@ void haptic_mode_decrease(void) {
}

void haptic_dwell_increase(void) {
#ifdef SOLENOID_ENABLE
#ifdef HAPTIC_SOLENOID
    int16_t next_dwell = ((int16_t)haptic_config.dwell) + SOLENOID_DWELL_STEP_SIZE;
    if (haptic_config.dwell >= SOLENOID_MAX_DWELL) {
        // if it's already at max, we wrap back to min


@@ 178,7 181,7 @@ void haptic_dwell_increase(void) {
}

void haptic_dwell_decrease(void) {
#ifdef SOLENOID_ENABLE
#ifdef HAPTIC_SOLENOID
    int16_t next_dwell = ((int16_t)haptic_config.dwell) - SOLENOID_DWELL_STEP_SIZE;
    if (haptic_config.dwell <= SOLENOID_MIN_DWELL) {
        // if it's already at min, we wrap to max


@@ 196,13 199,13 @@ void haptic_dwell_decrease(void) {

void haptic_reset(void) {
    set_haptic_config_enable(true);
    uint8_t feedback       = HAPTIC_FEEDBACK_DEFAULT;
    uint8_t feedback       = HAPTIC_DEFAULT_FEEDBACK;
    haptic_config.feedback = feedback;
#ifdef DRV2605L
    uint8_t mode       = HAPTIC_MODE_DEFAULT;
#ifdef HAPTIC_DRV2605L
    uint8_t mode       = HAPTIC_DEFAULT_MODE;
    haptic_config.mode = mode;
#endif
#ifdef SOLENOID_ENABLE
#ifdef HAPTIC_SOLENOID
    uint8_t dwell       = SOLENOID_DEFAULT_DWELL;
    haptic_config.dwell = dwell;
    haptic_config.buzz  = SOLENOID_DEFAULT_BUZZ;


@@ 213,41 216,41 @@ void haptic_reset(void) {
    haptic_config.buzz  = 0;
#endif
    eeconfig_update_haptic(haptic_config.raw);
    xprintf("haptic_config.feedback = %u\n", haptic_config.feedback);
    xprintf("haptic_config.mode = %u\n", haptic_config.mode);
    dprintf("haptic_config.feedback = %u\n", haptic_config.feedback);
    dprintf("haptic_config.mode = %u\n", haptic_config.mode);
}

void haptic_set_feedback(uint8_t feedback) {
    haptic_config.feedback = feedback;
    eeconfig_update_haptic(haptic_config.raw);
    xprintf("haptic_config.feedback = %u\n", haptic_config.feedback);
    dprintf("haptic_config.feedback = %u\n", haptic_config.feedback);
}

void haptic_set_mode(uint8_t mode) {
    haptic_config.mode = mode;
    eeconfig_update_haptic(haptic_config.raw);
    xprintf("haptic_config.mode = %u\n", haptic_config.mode);
    dprintf("haptic_config.mode = %u\n", haptic_config.mode);
}

void haptic_set_amplitude(uint8_t amp) {
    haptic_config.amplitude = amp;
    eeconfig_update_haptic(haptic_config.raw);
    xprintf("haptic_config.amplitude = %u\n", haptic_config.amplitude);
#ifdef DRV2605L
    DRV_amplitude(amp);
    dprintf("haptic_config.amplitude = %u\n", haptic_config.amplitude);
#ifdef HAPTIC_DRV2605L
    drv2605l_amplitude(amp);
#endif
}

void haptic_set_buzz(uint8_t buzz) {
    haptic_config.buzz = buzz;
    eeconfig_update_haptic(haptic_config.raw);
    xprintf("haptic_config.buzz = %u\n", haptic_config.buzz);
    dprintf("haptic_config.buzz = %u\n", haptic_config.buzz);
}

void haptic_set_dwell(uint8_t dwell) {
    haptic_config.dwell = dwell;
    eeconfig_update_haptic(haptic_config.raw);
    xprintf("haptic_config.dwell = %u\n", haptic_config.dwell);
    dprintf("haptic_config.dwell = %u\n", haptic_config.dwell);
}

uint8_t haptic_get_enable(void) {


@@ 277,19 280,19 @@ uint8_t haptic_get_dwell(void) {

void haptic_enable_continuous(void) {
    haptic_config.cont = 1;
    xprintf("haptic_config.cont = %u\n", haptic_config.cont);
    dprintf("haptic_config.cont = %u\n", haptic_config.cont);
    eeconfig_update_haptic(haptic_config.raw);
#ifdef DRV2605L
    DRV_rtp_init();
#ifdef HAPTIC_DRV2605L
    drv2605l_rtp_init();
#endif
}

void haptic_disable_continuous(void) {
    haptic_config.cont = 0;
    xprintf("haptic_config.cont = %u\n", haptic_config.cont);
    dprintf("haptic_config.cont = %u\n", haptic_config.cont);
    eeconfig_update_haptic(haptic_config.raw);
#ifdef DRV2605L
    DRV_write(DRV_MODE, 0x00);
#ifdef HAPTIC_DRV2605L
    drv2605l_write(DRV2605L_REG_MODE, 0x00);
#endif
}



@@ 318,15 321,15 @@ void haptic_cont_decrease(void) {
}

void haptic_play(void) {
#ifdef DRV2605L
#ifdef HAPTIC_DRV2605L
    uint8_t play_eff = 0;
    play_eff         = haptic_config.mode;
    DRV_pulse(play_eff);
    drv2605l_pulse(play_eff);
#    if defined(SPLIT_KEYBOARD) && defined(SPLIT_HAPTIC_ENABLE)
    split_haptic_play = haptic_config.mode;
#    endif
#endif
#ifdef SOLENOID_ENABLE
#ifdef HAPTIC_SOLENOID
    solenoid_fire_handler();
#    if defined(SPLIT_KEYBOARD) && defined(SPLIT_HAPTIC_ENABLE)
    split_haptic_play = 1;


@@ 335,7 338,7 @@ void haptic_play(void) {
}

void haptic_shutdown(void) {
#ifdef SOLENOID_ENABLE
#ifdef HAPTIC_SOLENOID
    solenoid_shutdown();
#endif
}

M quantum/haptic.h => quantum/haptic.h +5 -4
@@ 16,14 16,15 @@
 */

#pragma once

#include <stdint.h>
#include <stdbool.h>

#ifndef HAPTIC_FEEDBACK_DEFAULT
#    define HAPTIC_FEEDBACK_DEFAULT 0
#ifndef HAPTIC_DEFAULT_FEEDBACK
#    define HAPTIC_DEFAULT_FEEDBACK 0
#endif
#ifndef HAPTIC_MODE_DEFAULT
#    define HAPTIC_MODE_DEFAULT DRV_MODE_DEFAULT
#ifndef HAPTIC_DEFAULT_MODE
#    define HAPTIC_DEFAULT_MODE DRV2605L_DEFAULT_MODE
#endif

/* EEPROM config settings */

M quantum/process_keycode/process_space_cadet.c => quantum/process_keycode/process_space_cadet.c +3 -0
@@ 13,10 13,13 @@
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include "process_space_cadet.h"
#include "keycodes.h"
#include "timer.h"
#include "action.h"
#include "action_tapping.h"
#include "action_util.h"

// ********** OBSOLETE DEFINES, STOP USING! (pls?) **********
// Shift / paren setup

M quantum/split_common/split_util.c => quantum/split_common/split_util.c +1 -0
@@ 21,6 21,7 @@
#include "wait.h"
#include "debug.h"
#include "usb_util.h"
#include "bootloader.h"

#ifdef EE_HANDS
#    include "eeconfig.h"

M users/ishtob/ishtob.h => users/ishtob/ishtob.h +1 -1
@@ 36,7 36,7 @@ enum userspace_keycodes {
#define _FNLAYER 6
#define _NUMLAY 7
#define _MOUSECURSOR 8
#define _ADJUST 16
#define _ADJUST 9




Do not follow this link