From 63646e8906e062d1c1de3925cba70c4e3426a855 Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Sat, 12 Feb 2022 10:29:31 -0800 Subject: Format code according to conventions (#16322) --- drivers/haptic/DRV2605L.c | 6 ++++-- drivers/haptic/solenoid.c | 20 +++++++++++++++----- 2 files changed, 19 insertions(+), 7 deletions(-) (limited to 'drivers/haptic') diff --git a/drivers/haptic/DRV2605L.c b/drivers/haptic/DRV2605L.c index 5de2b354c9..5a1d2ca0af 100644 --- a/drivers/haptic/DRV2605L.c +++ b/drivers/haptic/DRV2605L.c @@ -106,12 +106,14 @@ void DRV_init(void) { 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_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_amplitude(uint8_t amplitude) { + DRV_write(DRV_RTP_INPUT, amplitude); +} void DRV_pulse(uint8_t sequence) { DRV_write(DRV_GO, 0x00); diff --git a/drivers/haptic/solenoid.c b/drivers/haptic/solenoid.c index 7a09940f78..14d868bffe 100644 --- a/drivers/haptic/solenoid.c +++ b/drivers/haptic/solenoid.c @@ -28,13 +28,21 @@ uint8_t solenoid_dwell = SOLENOID_DEFAULT_DWELL; extern haptic_config_t haptic_config; -void solenoid_buzz_on(void) { haptic_set_buzz(1); } +void solenoid_buzz_on(void) { + haptic_set_buzz(1); +} -void solenoid_buzz_off(void) { haptic_set_buzz(0); } +void solenoid_buzz_off(void) { + haptic_set_buzz(0); +} -void solenoid_set_buzz(int buzz) { haptic_set_buzz(buzz); } +void solenoid_set_buzz(int buzz) { + haptic_set_buzz(buzz); +} -void solenoid_set_dwell(uint8_t dwell) { solenoid_dwell = dwell; } +void solenoid_set_dwell(uint8_t dwell) { + solenoid_dwell = dwell; +} void solenoid_stop(void) { SOLENOID_PIN_WRITE_INACTIVE(); @@ -89,4 +97,6 @@ void solenoid_setup(void) { } } -void solenoid_shutdown(void) { SOLENOID_PIN_WRITE_INACTIVE(); } +void solenoid_shutdown(void) { + SOLENOID_PIN_WRITE_INACTIVE(); +} -- cgit v1.2.3