Skip to content

Commit 9a7d9e6

Browse files
quiretthinkyhead
andauthored
πŸ§‘β€πŸ’» Optimize PlatformIO source filtering (#25332)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
1 parent 774861b commit 9a7d9e6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+650
-297
lines changed

β€ŽMarlin/src/HAL/LPC1768/HAL.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,9 @@ int16_t PARSED_PIN_INDEX(const char code, const int16_t dval);
165165
// Defines
166166
// ------------------------
167167

168-
#define PLATFORM_M997_SUPPORT
168+
#ifndef PLATFORM_M997_SUPPORT
169+
#define PLATFORM_M997_SUPPORT
170+
#endif
169171
void flashFirmware(const int16_t);
170172

171173
#define HAL_CAN_SET_PWM_FREQ // This HAL supports PWM Frequency adjustment

β€ŽMarlin/src/HAL/LPC1768/tft/tft_spi.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
*
2121
*/
2222

23+
#ifdef TARGET_LPC1768
24+
2325
#include "../../../inc/MarlinConfig.h"
2426

2527
#if HAS_SPI_TFT
@@ -143,3 +145,4 @@ void TFT_SPI::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Coun
143145
}
144146

145147
#endif // HAS_SPI_TFT
148+
#endif // TARGET_LPC1768

β€ŽMarlin/src/HAL/LPC1768/tft/xpt2046.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
*
2121
*/
2222

23+
#ifdef TARGET_LPC1768
24+
2325
#include "../../../inc/MarlinConfig.h"
2426

2527
#if HAS_TFT_XPT2046 || HAS_RES_TOUCH_BUTTONS
@@ -130,4 +132,5 @@ uint16_t XPT2046::SoftwareIO(uint16_t data) {
130132
return result;
131133
}
132134

133-
#endif // HAS_TFT_XPT2046
135+
#endif // HAS_TFT_XPT2046 || HAS_RES_TOUCH_BUTTONS
136+
#endif // TARGET_LPC1768

β€ŽMarlin/src/HAL/STM32/HAL.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,9 @@ typedef libServo hal_servo_t;
175175
#define JTAGSWD_RESET() AFIO_DBGAFR_CONFIG(AFIO_MAPR_SWJ_CFG_RESET); // Reset: FULL SWD+JTAG
176176
#endif
177177

178-
#define PLATFORM_M997_SUPPORT
178+
#ifndef PLATFORM_M997_SUPPORT
179+
#define PLATFORM_M997_SUPPORT
180+
#endif
179181
void flashFirmware(const int16_t);
180182

181183
// Maple Compatibility

β€ŽMarlin/src/HAL/STM32F1/HAL.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,9 @@ void analogWrite(const pin_t pin, int pwm_val8); // PWM only! mul by 257 in mapl
205205
#define JTAG_DISABLE() afio_cfg_debug_ports(AFIO_DEBUG_SW_ONLY)
206206
#define JTAGSWD_DISABLE() afio_cfg_debug_ports(AFIO_DEBUG_NONE)
207207

208-
#define PLATFORM_M997_SUPPORT
208+
#ifndef PLATFORM_M997_SUPPORT
209+
#define PLATFORM_M997_SUPPORT
210+
#endif
209211
void flashFirmware(const int16_t);
210212

211213
#define HAL_CAN_SET_PWM_FREQ // This HAL supports PWM Frequency adjustment

0 commit comments

Comments
Β (0)