Skip to content

Commit

Permalink
πŸ§‘β€πŸ’» Optimize PlatformIO source filtering (MarlinFirmware#25332)
Browse files Browse the repository at this point in the history
Co-authored-by: Scott Lahteine <[email protected]>
  • Loading branch information
quiret and thinkyhead authored Apr 27, 2023
1 parent 774861b commit 9a7d9e6
Show file tree
Hide file tree
Showing 45 changed files with 650 additions and 297 deletions.
4 changes: 3 additions & 1 deletion Marlin/src/HAL/LPC1768/HAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ int16_t PARSED_PIN_INDEX(const char code, const int16_t dval);
// Defines
// ------------------------

#define PLATFORM_M997_SUPPORT
#ifndef PLATFORM_M997_SUPPORT
#define PLATFORM_M997_SUPPORT
#endif
void flashFirmware(const int16_t);

#define HAL_CAN_SET_PWM_FREQ // This HAL supports PWM Frequency adjustment
Expand Down
3 changes: 3 additions & 0 deletions Marlin/src/HAL/LPC1768/tft/tft_spi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
*
*/

#ifdef TARGET_LPC1768

#include "../../../inc/MarlinConfig.h"

#if HAS_SPI_TFT
Expand Down Expand Up @@ -143,3 +145,4 @@ void TFT_SPI::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Coun
}

#endif // HAS_SPI_TFT
#endif // TARGET_LPC1768
5 changes: 4 additions & 1 deletion Marlin/src/HAL/LPC1768/tft/xpt2046.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
*
*/

#ifdef TARGET_LPC1768

#include "../../../inc/MarlinConfig.h"

#if HAS_TFT_XPT2046 || HAS_RES_TOUCH_BUTTONS
Expand Down Expand Up @@ -130,4 +132,5 @@ uint16_t XPT2046::SoftwareIO(uint16_t data) {
return result;
}

#endif // HAS_TFT_XPT2046
#endif // HAS_TFT_XPT2046 || HAS_RES_TOUCH_BUTTONS
#endif // TARGET_LPC1768
4 changes: 3 additions & 1 deletion Marlin/src/HAL/STM32/HAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ typedef libServo hal_servo_t;
#define JTAGSWD_RESET() AFIO_DBGAFR_CONFIG(AFIO_MAPR_SWJ_CFG_RESET); // Reset: FULL SWD+JTAG
#endif

#define PLATFORM_M997_SUPPORT
#ifndef PLATFORM_M997_SUPPORT
#define PLATFORM_M997_SUPPORT
#endif
void flashFirmware(const int16_t);

// Maple Compatibility
Expand Down
4 changes: 3 additions & 1 deletion Marlin/src/HAL/STM32F1/HAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,9 @@ void analogWrite(const pin_t pin, int pwm_val8); // PWM only! mul by 257 in mapl
#define JTAG_DISABLE() afio_cfg_debug_ports(AFIO_DEBUG_SW_ONLY)
#define JTAGSWD_DISABLE() afio_cfg_debug_ports(AFIO_DEBUG_NONE)

#define PLATFORM_M997_SUPPORT
#ifndef PLATFORM_M997_SUPPORT
#define PLATFORM_M997_SUPPORT
#endif
void flashFirmware(const int16_t);

#define HAL_CAN_SET_PWM_FREQ // This HAL supports PWM Frequency adjustment
Expand Down
Loading

0 comments on commit 9a7d9e6

Please sign in to comment.