Skip to content

Commit

Permalink
Zipping compiler warning about POW_PD_EXT / Option B
Browse files Browse the repository at this point in the history
  • Loading branch information
ia committed Jun 17, 2023
1 parent 2cf22aa commit 846ed65
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 16 deletions.
2 changes: 0 additions & 2 deletions source/Core/BSP/MHP30/configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,4 @@
#endif
#endif

#define POW_PD_EXT 0

#define FLASH_LOGOADDR (0x08000000 + (62 * 1024))
2 changes: 0 additions & 2 deletions source/Core/BSP/Miniware/configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,4 @@
#endif
#endif

#define POW_PD_EXT 0

#define FLASH_LOGOADDR (0x08000000 + (62 * 1024))
2 changes: 0 additions & 2 deletions source/Core/BSP/Pinecil/configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,6 @@
#endif
#endif

#define POW_PD_EXT 0

#define FLASH_LOGOADDR (0x08000000 + (126 * 1024))

#define HAS_POWER_DEBUG_MENU
2 changes: 0 additions & 2 deletions source/Core/BSP/Pinecilv2/configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,4 @@
#endif
#endif

#define POW_PD_EXT 0

#define FLASH_LOGOADDR (0x23000000 + (1022 * 1024))
4 changes: 2 additions & 2 deletions source/Core/Drivers/HUB238.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "Utils.h"
#include "configuration.h"

#if POW_PD_EXT == 1
#ifdef POW_PD_EXT
bool hub238_probe() { return I2CBB::probe(HUB238_ADDR); }

extern int32_t powerSupplyWattageLimit;
Expand Down Expand Up @@ -217,4 +217,4 @@ uint8_t hub238_source_currentX100() {
}
return 10;//Failsafe to 0.1 amp
}
#endif
#endif
4 changes: 2 additions & 2 deletions source/Core/Drivers/HUB238.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#ifndef _DRIVERS_HUB238_HPP_
#define _DRIVERS_HUB238_HPP_
#include "configuration.h"
#if POW_PD_EXT == 1
#ifdef POW_PD_EXT
#include <stdbool.h>
#include <stdint.h>

Expand Down Expand Up @@ -48,4 +48,4 @@ uint8_t hub238_source_currentX100();
uint16_t hub238_getVoltagePDOCurrent(uint8_t voltage);

#endif
#endif
#endif
4 changes: 2 additions & 2 deletions source/Core/Threads/OperatingModes/ShowStartupWarnings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void showWarnings(void) {
}
}
#endif
#if POW_PD_EXT == 1
#ifdef POW_PD_EXT
if (!hub238_probe()) {
if (getSettingValue(SettingsOptions::PDMissingWarningCounter) < 2) {
nextSettingValue(SettingsOptions::PDMissingWarningCounter);
Expand All @@ -47,4 +47,4 @@ void showWarnings(void) {
}
#endif
#endif
}
}
2 changes: 1 addition & 1 deletion source/Core/Threads/OperatingModes/USBPDDebug_HUSB238.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "HUB238.hpp"
#include "OperatingModes.h"
#if POW_PD_EXT == 1
#ifdef POW_PD_EXT
#ifdef HAS_POWER_DEBUG_MENU
void showPDDebug(void) {
// Print out the USB-PD state
Expand Down
2 changes: 1 addition & 1 deletion source/Core/Threads/POWThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void startPOWTask(void const *argument __unused) {
#else
(void)res;
#endif
#if POW_PD_EXT == 1
#ifdef POW_PD_EXT
hub238_check_negotiation();
#endif
power_check();
Expand Down

0 comments on commit 846ed65

Please sign in to comment.