haptic: naming cleanups (#21551)

This commit is contained in:
Ryan 2023-07-21 09:17:39 +10:00 committed by GitHub
parent b20b360404
commit b090354143
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
53 changed files with 667 additions and 660 deletions

View File

@ -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

View File

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

View File

@ -1,122 +0,0 @@
/* Copyright 2018 ishtob
* Driver for DRV2605L written for QMK
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* 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 <math.h>
uint8_t DRV2605L_transfer_buffer[2];
uint8_t DRV2605L_read_register;
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);
}
uint8_t DRV_read(uint8_t regaddress) {
i2c_readReg(DRV2605L_BASE_ADDRESS << 1, regaddress, &DRV2605L_read_register, 1, 100);
return DRV2605L_read_register;
}
void DRV_init(void) {
i2c_init();
/* 0x07 sets DRV2605 into calibration mode */
DRV_write(DRV_MODE, 0x07);
// DRV_write(DRV_FEEDBACK_CTRL,0xB6);
#if FB_ERM_LRA == 0
/* ERM settings */
DRV_write(DRV_RATED_VOLT, (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)));
# elif ERM_OPEN_LOOP == 1
DRV_write(DRV_OVERDRIVE_CLAMP_VOLT, (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)));
# if LRA_OPEN_LOOP == 0
DRV_write(DRV_OVERDRIVE_CLAMP_VOLT, ((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));
# endif
#endif
DRVREG_FBR FB_SET;
FB_SET.Bits.ERM_LRA = FB_ERM_LRA;
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);
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);
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);
DRVREG_CTRL3 C3_SET;
C3_SET.Bits.C3_LRA_OPEN_LOOP = LRA_OPEN_LOOP;
C3_SET.Bits.C3_N_PWM_ANALOG = N_PWM_ANALOG;
C3_SET.Bits.C3_LRA_DRIVE_MODE = LRA_DRIVE_MODE;
C3_SET.Bits.C3_DATA_FORMAT_RTO = DATA_FORMAT_RTO;
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);
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);
DRV_write(DRV_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);
// Play greeting sequence
DRV_write(DRV_GO, 0x00);
DRV_write(DRV_WAVEFORM_SEQ_1, DRV_GREETING);
DRV_write(DRV_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 DRV_amplitude(uint8_t amplitude) {
DRV_write(DRV_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);
}

File diff suppressed because it is too large Load Diff

126
drivers/haptic/drv2605l.c Normal file
View File

@ -0,0 +1,126 @@
/* Copyright 2018 ishtob
* Driver for DRV2605L written for QMK
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* 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 "i2c_master.h"
#include <math.h>
uint8_t drv2605l_write_buffer[2];
uint8_t drv2605l_read_buffer;
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 drv2605l_read(uint8_t reg_addr) {
i2c_readReg(DRV2605L_I2C_ADDRESS << 1, reg_addr, &drv2605l_read_buffer, 1, 100);
return drv2605l_read_buffer;
}
void drv2605l_init(void) {
i2c_init();
/* 0x07 sets DRV2605 into calibration mode */
drv2605l_write(DRV2605L_REG_MODE, 0x07);
// drv2605l_write(DRV2605L_REG_FEEDBACK_CTRL,0xB6);
#if FB_ERM_LRA == 0
/* ERM settings */
drv2605l_write(DRV2605L_REG_RATED_VOLTAGE, (RATED_VOLTAGE / 21.33) * 1000);
# if ERM_OPEN_LOOP == 0
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
drv2605l_write(DRV2605L_REG_OVERDRIVE_CLAMP_VOLTAGE, (V_PEAK / 0.02196));
# endif
#elif FB_ERM_LRA == 1
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
drv2605l_write(DRV2605L_REG_OVERDRIVE_CLAMP_VOLTAGE, ((V_PEAK / sqrt(1 - (F_LRA * 0.0008)) / 0.02133)));
# elif LRA_OPEN_LOOP == 1
drv2605l_write(DRV2605L_REG_OVERDRIVE_CLAMP_VOLTAGE, (V_PEAK / 0.02196));
# endif
#endif
DRVREG_FBR FB_SET;
FB_SET.Bits.ERM_LRA = FB_ERM_LRA;
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*/
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;
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;
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;
C3_SET.Bits.C3_LRA_DRIVE_MODE = LRA_DRIVE_MODE;
C3_SET.Bits.C3_DATA_FORMAT_RTO = DATA_FORMAT_RTO;
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;
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;
drv2605l_write(DRV2605L_REG_CTRL4, (uint8_t)C4_SET.Byte);
drv2605l_write(DRV2605L_REG_LIBRARY_SELECTION, DRV2605L_LIBRARY);
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 */
drv2605l_write(DRV2605L_REG_MODE, 0x00);
// Play greeting sequence
drv2605l_write(DRV2605L_REG_GO, 0x00);
drv2605l_write(DRV2605L_REG_WAVEFORM_SEQUENCER_1, DRV2605L_GREETING);
drv2605l_write(DRV2605L_REG_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 drv2605l_amplitude(uint8_t amplitude) {
drv2605l_write(DRV2605L_REG_RTP_INPUT, amplitude);
}
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);
}

407
drivers/haptic/drv2605l.h Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
VIA_ENABLE = yes
HAPTIC_ENABLE = yes
HAPTIC_DRIVER += SOLENOID
HAPTIC_DRIVER = solenoid
ENCODER_MAP_ENABLE = yes # Encoder mapping functionality

View File

@ -1,4 +1,4 @@
VIA_ENABLE = yes
LTO_ENABLE = yes
HAPTIC_ENABLE = yes
HAPTIC_DRIVER += SOLENOID
HAPTIC_DRIVER = solenoid

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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;
}

View File

@ -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

View File

@ -1 +0,0 @@
#pragma once

View File

@ -239,12 +239,3 @@ bool music_mask_user(uint16_t keycode) {
return true;
}
}
void matrix_init_keymap(void) {
}
void matrix_scan_keymap(void) {
}

View File

@ -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

View File

@ -1,2 +1,2 @@
HAPTIC_ENABLE = yes
HAPTIC_DRIVER = SOLENOID
HAPTIC_DRIVER = solenoid

View File

@ -1,2 +1 @@
AUDIO_ENABLE = yes
HAPTIC_ENABLE += SOLENOID

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -1,6 +1,6 @@
LTO_ENABLE = yes
HAPTIC_ENABLE = yes
HAPTIC_DRIVER += SOLENOID
HAPTIC_DRIVER = solenoid
OLED_ENABLE = yes
OLED_DRIVER = SSD1306

View File

@ -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

View File

@ -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

View File

@ -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

Some files were not shown because too many files have changed in this diff Show More