summaryrefslogtreecommitdiffstats
path: root/keyboards
diff options
context:
space:
mode:
authorishtob <ishtob@gmail.com>2019-02-16 21:39:30 -0500
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>2019-02-16 18:39:30 -0800
commit2cee371bf125a6ec541dd7c5a809573facc7c456 (patch)
tree7bb6c074b759843d531eee67d65d91618bd79732 /keyboards
parenta7a647b7f6d707e9c952461beeca1f3637039d36 (diff)
Haptic feedback generalized - DRV2605 and solenoids (#4939)
* initial work to add eeprom to haptic feedback and decouple the feedback process from keyboards * Haptic feedback enhancements: on/off toggle working, feedback order working todo: -work on modes switching -get modes switching to save to eeprom * haptic enhancement - eeprom and modes added * Added set and get functions for haptic feedback * initial implementation of solenoids under haptic feedback * changed eeprom to 32 bits to reserve blocks for future features * start documentation of haptic feedback * change keycode per comment from reviewers * typo fixes * added eeprom for solenoid configs * added solenoid and docs * Add/fix default parameters configs, improve docs * more doc cleanup * add in solenoid buzz toggle, clean up doc * some fixes for error in compiling solenoid * fix a chibios specific i2c read function and added one for AVR controllers in DRV2605L.c * fixes for avr side issues * update keymap * fix keymap compile error * fix bugs found during solenoid testing * set pin that is not powered during bootloader * added warning about certain pins on the MCU may trip solenoid during DFU/bootloader
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/hadron/ver3/config.h3
-rw-r--r--keyboards/hadron/ver3/keymaps/default/keymap.c4
-rw-r--r--keyboards/hadron/ver3/keymaps/ishtob/keymap.c2
-rw-r--r--keyboards/hadron/ver3/rules.mk2
-rw-r--r--keyboards/hadron/ver3/ver3.c10
5 files changed, 8 insertions, 13 deletions
diff --git a/keyboards/hadron/ver3/config.h b/keyboards/hadron/ver3/config.h
index d6c3830dfd..1804921825 100644
--- a/keyboards/hadron/ver3/config.h
+++ b/keyboards/hadron/ver3/config.h
@@ -192,4 +192,7 @@
//#define DRIVER_LED_TOTAL RGBLED_NUM
//#define RGB_MATRIX_KEYPRESSES
+
+#define SOLENOID_PIN A14
+
#endif
diff --git a/keyboards/hadron/ver3/keymaps/default/keymap.c b/keyboards/hadron/ver3/keymaps/default/keymap.c
index 11761b3210..507c8314b6 100644
--- a/keyboards/hadron/ver3/keymaps/default/keymap.c
+++ b/keyboards/hadron/ver3/keymaps/default/keymap.c
@@ -190,8 +190,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `--------------------------------------------------------------------------------------------------------'
*/
[_ADJUST] = LAYOUT(
- KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
- RESET, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, KC_DEL, \
+ RESET, HPT_TOG, HPT_FBK, HPT_MODI, HPT_MODD, HPT_RST , _______, _______, _______, _______, _______, _______, \
+ _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, KC_DEL, \
_______, _______, _______, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, AG_SWAP, QWERTY, COLEMAK, _______, _______, _______, \
_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, BL_DEC, BL_INC, BL_STEP, BL_TOGG, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CK_RST, CK_DOWN, CK_UP, CK_TOGG\
diff --git a/keyboards/hadron/ver3/keymaps/ishtob/keymap.c b/keyboards/hadron/ver3/keymaps/ishtob/keymap.c
index 641c016247..140d148b7e 100644
--- a/keyboards/hadron/ver3/keymaps/ishtob/keymap.c
+++ b/keyboards/hadron/ver3/keymaps/ishtob/keymap.c
@@ -165,7 +165,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `--------------------------------------------------------------------------------------------------------'
*/
[_ADJUST] = LAYOUT_wrapper(
- KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \
+ _______, HPT_TOG, HPT_FBK, HPT_MODI, HPT_MODD, HPT_RST, _______, _______, _______, _______, _______, _______, \
RESET, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, KC_DEL, \
_______, MAGIC_TOGGLE_NKRO, _______, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, AG_SWAP, QWERTY, COLEMAK, _______, _______, _______, \
_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, BL_DEC, BL_INC, BL_STEP, BL_TOGG, \
diff --git a/keyboards/hadron/ver3/rules.mk b/keyboards/hadron/ver3/rules.mk
index 8375efdd35..2a86623157 100644
--- a/keyboards/hadron/ver3/rules.mk
+++ b/keyboards/hadron/ver3/rules.mk
@@ -52,6 +52,6 @@ NKRO_ENABLE = yes # USB Nkey Rollover
CUSTOM_MATRIX = yes # Custom matrix file
AUDIO_ENABLE = yes
RGBLIGHT_ENABLE = no
-HAPTIC_ENABLE = DRV2605L
+HAPTIC_ENABLE += DRV2605L
QWIIC_ENABLE += MICRO_OLED
# SERIAL_LINK_ENABLE = yes
diff --git a/keyboards/hadron/ver3/ver3.c b/keyboards/hadron/ver3/ver3.c
index 5e5e3e009f..37169fe2f3 100644
--- a/keyboards/hadron/ver3/ver3.c
+++ b/keyboards/hadron/ver3/ver3.c
@@ -17,7 +17,7 @@
#include "qwiic.h"
#include "action_layer.h"
#include "matrix.h"
-#include "DRV2605L.h"
+#include "haptic.h"
#ifdef QWIIC_MICRO_OLED_ENABLE
@@ -167,20 +167,12 @@ void encoder_update_kb(uint8_t index, bool clockwise) {
#endif
void matrix_init_kb(void) {
-#ifdef DRV2605L
- DRV_init();
-#endif
queue_for_send = true;
matrix_init_user();
}
void matrix_scan_kb(void) {
-
if (queue_for_send) {
- #ifdef DRV2605L
- DRV_EFFECT play_eff = strong_click;
- DRV_pulse(play_eff);
- #endif
#ifdef QWIIC_MICRO_OLED_ENABLE
read_host_led_state();
draw_ui();