Skip to content

Commit

Permalink
clang
Browse files Browse the repository at this point in the history
  • Loading branch information
tueddy committed Dec 18, 2024
1 parent 62e55a1 commit e639e22
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Power.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@

void Power_Init(void) {
#ifdef POWER
#if (POWER >= 0 && POWER <= MAX_GPIO)
#if (POWER >= 0 && POWER <= MAX_GPIO)
pinMode(POWER, OUTPUT); // Only necessary for GPIO. For port-expander it's done (previously) via Port_init()
#endif
#endif
#endif
}

// Switch on peripherals. Please note: meaning of POWER_ON is HIGH per default. But is LOW in case of INVERT_POWER is enabled.
void Power_PeripheralOn(void) {
#ifdef POWER
Port_Write(POWER, POWER_ON, false);
#ifdef BUTTONS_LED
#ifdef BUTTONS_LED
Port_Write(BUTTONS_LED, HIGH, false);
#endif
#endif
delay(50); // Give peripherals some time to settle down
#endif
}
Expand All @@ -28,8 +28,8 @@ void Power_PeripheralOn(void) {
void Power_PeripheralOff(void) {
#ifdef POWER
Port_Write(POWER, POWER_OFF, false);
#ifdef BUTTONS_LED
#ifdef BUTTONS_LED
Port_Write(BUTTONS_LED, LOW, false);
#endif
#endif
#endif
}

0 comments on commit e639e22

Please sign in to comment.