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/led/apa102.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'drivers/led/apa102.c') diff --git a/drivers/led/apa102.c b/drivers/led/apa102.c index 00e7eb4505..f291948975 100644 --- a/drivers/led/apa102.c +++ b/drivers/led/apa102.c @@ -20,15 +20,15 @@ #ifndef APA102_NOPS # if defined(__AVR__) -# define APA102_NOPS 0 // AVR at 16 MHz already spends 62.5 ns per clock, so no extra delay is needed +# define APA102_NOPS 0 // AVR at 16 MHz already spends 62.5 ns per clock, so no extra delay is needed # elif defined(PROTOCOL_CHIBIOS) # include "hal.h" # if defined(STM32F0XX) || defined(STM32F1XX) || defined(STM32F3XX) || defined(STM32F4XX) || defined(STM32L0XX) || defined(GD32VF103) -# define APA102_NOPS (100 / (1000000000L / (CPU_CLOCK / 4))) // This calculates how many loops of 4 nops to run to delay 100 ns +# define APA102_NOPS (100 / (1000000000L / (CPU_CLOCK / 4))) // This calculates how many loops of 4 nops to run to delay 100 ns # else # error("APA102_NOPS configuration required") -# define APA102_NOPS 0 // this just pleases the compile so the above error is easier to spot +# define APA102_NOPS 0 // this just pleases the compile so the above error is easier to spot # endif # endif #endif @@ -72,7 +72,9 @@ void apa102_setleds(LED_TYPE *start_led, uint16_t num_leds) { } // Overwrite the default rgblight_call_driver to use apa102 driver -void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds) { apa102_setleds(start_led, num_leds); } +void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds) { + apa102_setleds(start_led, num_leds); +} void static apa102_init(void) { setPinOutput(RGB_DI_PIN); -- cgit v1.2.3