diff --git a/Marlin/src/pins/esp32/env_validate.h b/Marlin/src/pins/esp32/env_validate.h index ce14c33414ad..0bfd0ebd92be 100644 --- a/Marlin/src/pins/esp32/env_validate.h +++ b/Marlin/src/pins/esp32/env_validate.h @@ -19,8 +19,11 @@ * along with this program. If not, see . * */ -#pragma once +#ifndef ENV_VALIDATE_H +#define ENV_VALIDATE_H #if NOT_TARGET(ARDUINO_ARCH_ESP32) #error "Oops! Select an ESP32 board in 'Tools > Board.'" #endif + +#endif diff --git a/Marlin/src/pins/gd32f1/env_validate.h b/Marlin/src/pins/gd32f1/env_validate.h index 4b07cce4e5c4..f6882e70d633 100644 --- a/Marlin/src/pins/gd32f1/env_validate.h +++ b/Marlin/src/pins/gd32f1/env_validate.h @@ -19,14 +19,11 @@ * along with this program. If not, see . * */ -#pragma once +#ifndef ENV_VALIDATE_H +#define ENV_VALIDATE_H #if NOT_TARGET(__STM32F1__, STM32F1) - #if DISABLED(ALLOW_STM32F4) - #error "Oops! Select an STM32F1 board in 'Tools > Board.'" - #elif NOT_TARGET(STM32F4) - #error "Oops! Select an STM32F4 board in 'Tools > Board.'" - #endif + #error "Oops! Select an STM32F1 board in 'Tools > Board.'" #endif -#undef ALLOW_STM32F4 +#endif diff --git a/Marlin/src/pins/lpc1768/env_validate.h b/Marlin/src/pins/lpc1768/env_validate.h index adb3ea938dc2..8a6a1cebd368 100644 --- a/Marlin/src/pins/lpc1768/env_validate.h +++ b/Marlin/src/pins/lpc1768/env_validate.h @@ -19,7 +19,8 @@ * along with this program. If not, see . * */ -#pragma once +#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." @@ -28,3 +29,5 @@ #endif #undef REQUIRE_LPC1769 + +#endif diff --git a/Marlin/src/pins/lpc1769/env_validate.h b/Marlin/src/pins/lpc1769/env_validate.h index 2e2b63d5203f..0f62412453a4 100644 --- a/Marlin/src/pins/lpc1769/env_validate.h +++ b/Marlin/src/pins/lpc1769/env_validate.h @@ -19,8 +19,11 @@ * along with this program. If not, see . * */ -#pragma once +#ifndef ENV_VALIDATE_H +#define ENV_VALIDATE_H #if NOT_TARGET(MCU_LPC1769) #error "Oops! Make sure you have the LPC1769 environment selected in your IDE." #endif + +#endif diff --git a/Marlin/src/pins/mega/env_validate.h b/Marlin/src/pins/mega/env_validate.h index 97c52d4e5e05..7b6462ab7a97 100644 --- a/Marlin/src/pins/mega/env_validate.h +++ b/Marlin/src/pins/mega/env_validate.h @@ -19,7 +19,8 @@ * along with this program. If not, see . * */ -#pragma once +#ifndef ENV_VALIDATE_H +#define ENV_VALIDATE_H #if NOT_TARGET(__AVR_ATmega2560__) #if DISABLED(ALLOW_MEGA1280) @@ -30,3 +31,5 @@ #endif #undef ALLOW_MEGA1280 + +#endif diff --git a/Marlin/src/pins/rambo/env_validate.h b/Marlin/src/pins/rambo/env_validate.h index 84cf8392cdfc..ce2818f596d3 100644 --- a/Marlin/src/pins/rambo/env_validate.h +++ b/Marlin/src/pins/rambo/env_validate.h @@ -19,8 +19,11 @@ * along with this program. If not, see . * */ -#pragma once +#ifndef ENV_VALIDATE_H +#define ENV_VALIDATE_H #if NOT_TARGET(__AVR_ATmega2560__) #error "Oops! Select 'Arduino Mega 2560 or Rambo' in 'Tools > Board.'" #endif + +#endif diff --git a/Marlin/src/pins/ramps/env_validate.h b/Marlin/src/pins/ramps/env_validate.h index 6006a78f013c..86d7bce16c16 100644 --- a/Marlin/src/pins/ramps/env_validate.h +++ b/Marlin/src/pins/ramps/env_validate.h @@ -19,7 +19,8 @@ * along with this program. If not, see . * */ -#pragma once +#ifndef ENV_VALIDATE_H +#define ENV_VALIDATE_H #if ENABLED(ALLOW_SAM3X8E) #if NOT_TARGET(__SAM3X8E__, __AVR_ATmega2560__) @@ -33,3 +34,5 @@ #undef ALLOW_SAM3X8E #undef REQUIRE_MEGA2560 + +#endif diff --git a/Marlin/src/pins/sam/env_validate.h b/Marlin/src/pins/sam/env_validate.h index 09bcd1364921..c6f4d76894be 100644 --- a/Marlin/src/pins/sam/env_validate.h +++ b/Marlin/src/pins/sam/env_validate.h @@ -19,7 +19,8 @@ * along with this program. If not, see . * */ -#pragma once +#ifndef ENV_VALIDATE_H +#define ENV_VALIDATE_H #if BOTH(ALLOW_MEGA1280, ALLOW_MEGA2560) && NOT_TARGET(__SAM3X8E__, __AVR_ATmega1280__, __AVR_ATmega2560__) #error "Oops! Select 'Arduino Due or Mega' in 'Tools > Board.'" @@ -31,3 +32,5 @@ #undef ALLOW_MEGA1280 #undef ALLOW_MEGA2560 + +#endif diff --git a/Marlin/src/pins/sanguino/env_validate.h b/Marlin/src/pins/sanguino/env_validate.h index d229b6f102e4..bd7947f469a5 100644 --- a/Marlin/src/pins/sanguino/env_validate.h +++ b/Marlin/src/pins/sanguino/env_validate.h @@ -19,7 +19,8 @@ * along with this program. If not, see . * */ -#pragma once +#ifndef ENV_VALIDATE_H +#define ENV_VALIDATE_H #if ENABLED(ALLOW_MEGA644) #if NOT_TARGET(__AVR_ATmega644__, __AVR_ATmega644P__, __AVR_ATmega1284P__) @@ -40,3 +41,5 @@ #undef ALLOW_MEGA644 #undef ALLOW_MEGA644P #undef REQUIRE_MEGA644P + +#endif diff --git a/Marlin/src/pins/stm32f1/env_validate.h b/Marlin/src/pins/stm32f1/env_validate.h index 2d325428ac8c..47399a062d6c 100644 --- a/Marlin/src/pins/stm32f1/env_validate.h +++ b/Marlin/src/pins/stm32f1/env_validate.h @@ -19,7 +19,8 @@ * along with this program. If not, see . * */ -#pragma once +#ifndef ENV_VALIDATE_H +#define ENV_VALIDATE_H #if NOT_TARGET(__STM32F1__, STM32F1) #if DISABLED(ALLOW_STM32F4) @@ -30,3 +31,5 @@ #endif #undef ALLOW_STM32F4 + +#endif diff --git a/Marlin/src/pins/stm32f4/env_validate.h b/Marlin/src/pins/stm32f4/env_validate.h index c01401f06c9a..91adbfc86929 100644 --- a/Marlin/src/pins/stm32f4/env_validate.h +++ b/Marlin/src/pins/stm32f4/env_validate.h @@ -19,10 +19,13 @@ * along with this program. If not, see . * */ -#pragma once +#ifndef ENV_VALIDATE_H +#define ENV_VALIDATE_H #if NOT_TARGET(STM32F4) && (DISABLED(ALLOW_STM32DUINO) || NOT_TARGET(STM32F4xx)) #error "Oops! Select an STM32F4 board in 'Tools > Board.'" #endif #undef ALLOW_STM32DUINO + +#endif diff --git a/Marlin/src/pins/stm32g0/env_validate.h b/Marlin/src/pins/stm32g0/env_validate.h index a7be76bd8bb1..03887eb7a491 100644 --- a/Marlin/src/pins/stm32g0/env_validate.h +++ b/Marlin/src/pins/stm32g0/env_validate.h @@ -19,8 +19,11 @@ * along with this program. If not, see . * */ -#pragma once +#ifndef ENV_VALIDATE_H +#define ENV_VALIDATE_H #if NOT_TARGET(STM32G0xx) || NOT_TARGET(STM32G0B1xx) #error "Oops! Select an STM32G0 board in 'Tools > Board.'" #endif + +#endif diff --git a/Marlin/src/pins/stm32h7/env_validate.h b/Marlin/src/pins/stm32h7/env_validate.h index 0c515e5df6be..7feaf2095909 100644 --- a/Marlin/src/pins/stm32h7/env_validate.h +++ b/Marlin/src/pins/stm32h7/env_validate.h @@ -19,8 +19,11 @@ * along with this program. If not, see . * */ -#pragma once +#ifndef ENV_VALIDATE_H +#define ENV_VALIDATE_H #if NOT_TARGET(STM32H7) #error "Oops! Select an STM32H7 board in 'Tools > Board.'" #endif + +#endif diff --git a/Marlin/src/pins/teensy2/env_validate.h b/Marlin/src/pins/teensy2/env_validate.h index 5f0ea4f3b672..8fd6fba31932 100644 --- a/Marlin/src/pins/teensy2/env_validate.h +++ b/Marlin/src/pins/teensy2/env_validate.h @@ -19,10 +19,13 @@ * along with this program. If not, see . * */ -#pragma once +#ifndef ENV_VALIDATE_H +#define ENV_VALIDATE_H #if NOT_TARGET(__AVR_AT90USB1286__) && (DISABLED(ALLOW_AT90USB1286P) || NOT_TARGET(__AVR_AT90USB1286P__)) #error "Oops! Select 'Teensy++ 2.0' or 'Printrboard' in 'Tools > Board.'" #endif #undef ALLOW_AT90USB1286P + +#endif