summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorjacob-w-gable <82864625+jacob-w-gable@users.noreply.github.com>2023-09-24 21:23:31 -0500
committerGitHub <noreply@github.com>2023-09-25 12:23:31 +1000
commit99290b4c7e891e69ca161d79c74a0e32014645bb (patch)
treee52a0ab1c51c56a78a8157169fb0a8f7c0acdfc2 /drivers
parent7a761ebf7dfc4aa27132583a9a7ba7790df72b32 (diff)
Add full solenoid support on split keyboards (#21583)
Co-authored-by: Jacob Gable <jacob.gable@statheros.tech>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/haptic/solenoid.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/haptic/solenoid.c b/drivers/haptic/solenoid.c
index 4e43903255..da4095cda4 100644
--- a/drivers/haptic/solenoid.c
+++ b/drivers/haptic/solenoid.c
@@ -23,7 +23,6 @@
#include "util.h"
#include <stdlib.h>
-uint8_t solenoid_dwell = SOLENOID_DEFAULT_DWELL;
static pin_t solenoid_pads[] = SOLENOID_PINS;
#define NUMBER_OF_SOLENOIDS ARRAY_SIZE(solenoid_pads)
bool solenoid_on[NUMBER_OF_SOLENOIDS] = {false};
@@ -53,7 +52,7 @@ void solenoid_set_buzz(uint8_t buzz) {
}
void solenoid_set_dwell(uint8_t dwell) {
- solenoid_dwell = dwell;
+ haptic_set_dwell(dwell);
}
/**
@@ -119,7 +118,7 @@ void solenoid_check(void) {
elapsed[i] = timer_elapsed(solenoid_start[i]);
// Check if it's time to finish this solenoid click cycle
- if (elapsed[i] > solenoid_dwell) {
+ if (elapsed[i] > haptic_config.dwell) {
solenoid_stop(i);
continue;
}