Skip to content

Commit 6464baf

Browse files
committed
chore: autoformatting
1 parent 2f0a9c7 commit 6464baf

File tree

1 file changed

+13
-27
lines changed

1 file changed

+13
-27
lines changed

radio/src/targets/horus/led_driver.cpp

+13-27
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
* GNU General Public License for more details.
2020
*/
2121

22-
#include "hal/gpio.h"
23-
#include "stm32_gpio.h"
24-
#include "boards/generic_stm32/rgb_leds.h"
2522
#include "board.h"
23+
#include "boards/generic_stm32/rgb_leds.h"
2624
#include "colors.h"
25+
#include "hal/gpio.h"
26+
#include "stm32_gpio.h"
2727

2828
void ledInit()
2929
{
@@ -48,7 +48,6 @@ void ledInit()
4848
gpio_init(FSLED_GPIO_5, GPIO_OUT, GPIO_PIN_SPEED_LOW);
4949
gpio_init(FSLED_GPIO_6, GPIO_OUT, GPIO_PIN_SPEED_LOW);
5050
#endif
51-
5251
}
5352

5453
#if defined(FUNCTION_SWITCHES_RGB_LEDS)
@@ -57,44 +56,31 @@ uint8_t ledMapping[] = {1, 2, 3, 4, 5, 6};
5756

5857
void fsLedOff(uint8_t index, uint32_t color)
5958
{
60-
rgbSetLedColor(ledMapping[index], GET_RED(color), \
61-
GET_GREEN(color),GET_BLUE(color));
59+
rgbSetLedColor(ledMapping[index], GET_RED(color), GET_GREEN(color),
60+
GET_BLUE(color));
6261
}
6362

6463
void fsLedOn(uint8_t index, uint32_t color)
6564
{
66-
rgbSetLedColor(ledMapping[index], GET_RED(color), \
67-
GET_GREEN(color),GET_BLUE(color));
65+
rgbSetLedColor(ledMapping[index], GET_RED(color), GET_GREEN(color),
66+
GET_BLUE(color));
6867
}
6968

7069
#elif defined(FUNCTION_SWITCHES)
71-
gpio_t fsLeds[] = {FSLED_GPIO_1, FSLED_GPIO_2,
72-
FSLED_GPIO_3, FSLED_GPIO_4,
73-
FSLED_GPIO_5, FSLED_GPIO_6};
70+
gpio_t fsLeds[] = {FSLED_GPIO_1, FSLED_GPIO_2, FSLED_GPIO_3,
71+
FSLED_GPIO_4, FSLED_GPIO_5, FSLED_GPIO_6};
7472

75-
void fsLedOff(uint8_t index)
76-
{
77-
gpio_clear(fsLeds[index]);
78-
}
73+
void fsLedOff(uint8_t index) { gpio_clear(fsLeds[index]); }
7974

80-
void fsLedOn(uint8_t index)
81-
{
82-
gpio_set(fsLeds[index]);
83-
}
75+
void fsLedOn(uint8_t index) { gpio_set(fsLeds[index]); }
8476

85-
bool fsLedState(uint8_t index)
86-
{
87-
return (gpio_read(fsLeds[index]));
88-
}
77+
bool fsLedState(uint8_t index) { return (gpio_read(fsLeds[index])); }
8978
#endif
9079

9180
#if defined(LED_GPIO)
9281

9382
// Single GPIO for dual color LED
94-
void ledOff()
95-
{
96-
gpio_init(LED_GPIO, GPIO_IN_PU, GPIO_PIN_SPEED_LOW);
97-
}
83+
void ledOff() { gpio_init(LED_GPIO, GPIO_IN_PU, GPIO_PIN_SPEED_LOW); }
9884

9985
void ledRed()
10086
{

0 commit comments

Comments
 (0)