Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add LPC1768 OR LPC1769 capability for board that can have either #27586

Open
wants to merge 3 commits into
base: bugfix-2.1.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions Marlin/src/pins/lpc1768/env_validate.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@
#ifndef ENV_VALIDATE_H
#define ENV_VALIDATE_H

#if ENABLED(REQUIRE_LPC1769) && NOT_TARGET(MCU_LPC1769)
#error "Oops! Make sure you have the LPC1769 environment selected in your IDE."
#elif DISABLED(REQUIRE_LPC1769) && NOT_TARGET(MCU_LPC1768)
#error "Oops! Make sure you have the LPC1768 environment selected in your IDE."
#if DISABLED(REQUIRE_EITHER_LPC1768_OR_LPC1769)
#if ENABLED(REQUIRE_LPC1769) && NOT_TARGET(MCU_LPC1769)
#error "Oops! Make sure you have the LPC1769 environment selected in your IDE."
#elif DISABLED(REQUIRE_LPC1769) && NOT_TARGET(MCU_LPC1768)
#error "Oops! Make sure you have the LPC1768 environment selected in your IDE."
#endif
#endif

#undef REQUIRE_LPC1769

#endif
#undef REQUIRE_EITHER_LPC1768_OR_LPC1769
#endif // ENV_VALIDATE_H
1 change: 1 addition & 0 deletions Marlin/src/pins/lpc1768/pins_MKS_SBASE.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* Makerbase MKS SBASE pin assignments
*/

#define REQUIRE_EITHER_LPC1768_OR_LPC1769
#include "env_validate.h"

#ifndef BOARD_INFO_NAME
Expand Down
5 changes: 3 additions & 2 deletions Marlin/src/pins/lpc1769/env_validate.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@
#ifndef ENV_VALIDATE_H
#define ENV_VALIDATE_H

#if NOT_TARGET(MCU_LPC1769)
#if NOT_TARGET(MCU_LPC1769) && DISABLED(REQUIRE_EITHER_LPC1768_OR_LPC1769)
#error "Oops! Make sure you have the LPC1769 environment selected in your IDE."
#endif

#endif
#undef REQUIRE_EITHER_LPC1768_OR_LPC1769
#endif //ENV_VALIDATE_H
1 change: 1 addition & 0 deletions Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
* See https://smoothieware.github.io/Webif-pack/documentation/web/html/smoothieboard.html
*/

#define REQUIRE_EITHER_LPC1768_OR_LPC1769
#include "env_validate.h"

#define BOARD_INFO_NAME "Smoothieboard"
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/pins/pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@
#elif MB(RAMPS_14_RE_ARM_EFB, RAMPS_14_RE_ARM_EEB, RAMPS_14_RE_ARM_EFF, RAMPS_14_RE_ARM_EEF, RAMPS_14_RE_ARM_SF)
#include "lpc1768/pins_RAMPS_RE_ARM.h" // LPC1768 env:LPC1768
#elif MB(MKS_SBASE)
#include "lpc1768/pins_MKS_SBASE.h" // LPC1768 env:LPC1768
#include "lpc1768/pins_MKS_SBASE.h" // LPC1768/9 env:LPC1768 env:LPC1769
#elif MB(AZSMZ_MINI)
#include "lpc1768/pins_AZSMZ_MINI.h" // LPC1768 env:LPC1768
#elif MB(BIQU_BQ111_A4)
Expand Down Expand Up @@ -497,7 +497,7 @@
#elif MB(COHESION3D_MINI)
#include "lpc1769/pins_COHESION3D_MINI.h" // LPC1769 env:LPC1769
#elif MB(SMOOTHIEBOARD)
#include "lpc1769/pins_SMOOTHIEBOARD.h" // LPC1769 env:LPC1769
#include "lpc1769/pins_SMOOTHIEBOARD.h" // LPC1768/9 env:LPC1768 env:LPC1769
#elif MB(TH3D_EZBOARD)
#include "lpc1769/pins_TH3D_EZBOARD.h" // LPC1769 env:LPC1769
#elif MB(BTT_SKR_V1_4_TURBO)
Expand Down