Ver código fonte

Apply #pragma once, misc cleanup (#12322)

* Apply #pragma once in headers
* Adjust some thermistors formatting
* Misc cleanup and formatting
Scott Lahteine 5 anos atrás
pai
commit
f5eab912ed
Nenhuma conta vinculada ao e-mail do autor do commit
100 arquivos alterados com 189 adições e 562 exclusões
  1. 1
    5
      Marlin/src/HAL/HAL_AVR/HAL.h
  2. 1
    5
      Marlin/src/HAL/HAL_AVR/MarlinSerial.h
  3. 1
    5
      Marlin/src/HAL/HAL_AVR/SanityCheck.h
  4. 1
    5
      Marlin/src/HAL/HAL_AVR/ServoTimers.h
  5. 1
    5
      Marlin/src/HAL/HAL_AVR/endstop_interrupts.h
  6. 1
    5
      Marlin/src/HAL/HAL_AVR/fastio_1280.h
  7. 1
    5
      Marlin/src/HAL/HAL_AVR/fastio_1281.h
  8. 1
    5
      Marlin/src/HAL/HAL_AVR/fastio_168.h
  9. 1
    5
      Marlin/src/HAL/HAL_AVR/fastio_644.h
  10. 1
    5
      Marlin/src/HAL/HAL_AVR/fastio_AT90USB.h
  11. 1
    5
      Marlin/src/HAL/HAL_AVR/fastio_AVR.h
  12. 1
    5
      Marlin/src/HAL/HAL_AVR/math_AVR.h
  13. 1
    5
      Marlin/src/HAL/HAL_AVR/pinsDebug.h
  14. 1
    5
      Marlin/src/HAL/HAL_AVR/pinsDebug_Teensyduino.h
  15. 1
    6
      Marlin/src/HAL/HAL_AVR/pinsDebug_plus_70.h
  16. 1
    6
      Marlin/src/HAL/HAL_AVR/spi_pins.h
  17. 1
    5
      Marlin/src/HAL/HAL_AVR/watchdog_AVR.h
  18. 1
    5
      Marlin/src/HAL/HAL_DUE/HAL.h
  19. 1
    5
      Marlin/src/HAL/HAL_DUE/HAL_timers_Due.h
  20. 1
    6
      Marlin/src/HAL/HAL_DUE/InterruptVectors_Due.h
  21. 1
    4
      Marlin/src/HAL/HAL_DUE/MarlinSerialUSB_Due.h
  22. 1
    5
      Marlin/src/HAL/HAL_DUE/endstop_interrupts.h
  23. 1
    5
      Marlin/src/HAL/HAL_DUE/fastio_Due.h
  24. 1
    5
      Marlin/src/HAL/HAL_DUE/spi_pins.h
  25. 3
    9
      Marlin/src/HAL/HAL_DUE/usb/arduino_due_x.h
  26. 1
    5
      Marlin/src/HAL/HAL_DUE/watchdog_Due.h
  27. 1
    5
      Marlin/src/HAL/HAL_ESP32/HAL.h
  28. 1
    5
      Marlin/src/HAL/HAL_ESP32/HAL_timers_ESP32.h
  29. 1
    5
      Marlin/src/HAL/HAL_ESP32/endstop_interrupts.h
  30. 1
    9
      Marlin/src/HAL/HAL_ESP32/fastio_ESP32.h
  31. 1
    5
      Marlin/src/HAL/HAL_ESP32/ota.h
  32. 1
    5
      Marlin/src/HAL/HAL_ESP32/spi_pins.h
  33. 2
    6
      Marlin/src/HAL/HAL_ESP32/watchdog_ESP32.h
  34. 1
    5
      Marlin/src/HAL/HAL_LPC1768/HAL.h
  35. 1
    5
      Marlin/src/HAL/HAL_LPC1768/HAL_timers.h
  36. 1
    5
      Marlin/src/HAL/HAL_LPC1768/MarlinSerial.h
  37. 2
    6
      Marlin/src/HAL/HAL_LPC1768/MarlinServo.h
  38. 1
    5
      Marlin/src/HAL/HAL_LPC1768/endstop_interrupts.h
  39. 1
    5
      Marlin/src/HAL/HAL_LPC1768/fastio.h
  40. 1
    5
      Marlin/src/HAL/HAL_LPC1768/include/digipot_mcp4451_I2C_routines.h
  41. 1
    5
      Marlin/src/HAL/HAL_LPC1768/spi_pins.h
  42. 1
    5
      Marlin/src/HAL/HAL_LPC1768/watchdog.h
  43. 1
    5
      Marlin/src/HAL/HAL_STM32F1/HAL.h
  44. 1
    5
      Marlin/src/HAL/HAL_STM32F1/HAL_Servo_Stm32f1.h
  45. 1
    5
      Marlin/src/HAL/HAL_STM32F1/HAL_timers_Stm32f1.h
  46. 1
    5
      Marlin/src/HAL/HAL_STM32F1/endstop_interrupts.h
  47. 1
    5
      Marlin/src/HAL/HAL_STM32F1/fastio_Stm32f1.h
  48. 1
    5
      Marlin/src/HAL/HAL_STM32F1/spi_pins.h
  49. 1
    5
      Marlin/src/HAL/HAL_STM32F1/watchdog_Stm32f1.h
  50. 1
    6
      Marlin/src/HAL/HAL_STM32F4/EEPROM_Emul/eeprom_emul.h
  51. 1
    5
      Marlin/src/HAL/HAL_STM32F4/HAL.h
  52. 3
    7
      Marlin/src/HAL/HAL_STM32F4/HAL_Servo_STM32F4.h
  53. 1
    5
      Marlin/src/HAL/HAL_STM32F4/HAL_timers_STM32F4.h
  54. 1
    5
      Marlin/src/HAL/HAL_STM32F4/endstop_interrupts.h
  55. 1
    5
      Marlin/src/HAL/HAL_STM32F4/fastio_STM32F4.h
  56. 1
    7
      Marlin/src/HAL/HAL_STM32F4/watchdog_STM32F4.h
  57. 1
    6
      Marlin/src/HAL/HAL_STM32F7/EEPROM_Emul/eeprom_emul.h
  58. 1
    5
      Marlin/src/HAL/HAL_STM32F7/HAL.h
  59. 1
    5
      Marlin/src/HAL/HAL_STM32F7/HAL_Servo_STM32F7.h
  60. 1
    5
      Marlin/src/HAL/HAL_STM32F7/HAL_timers_STM32F7.h
  61. 2
    7
      Marlin/src/HAL/HAL_STM32F7/TMC2660.h
  62. 1
    7
      Marlin/src/HAL/HAL_STM32F7/endstop_interrupts.h
  63. 1
    5
      Marlin/src/HAL/HAL_STM32F7/fastio_STM32F7.h
  64. 1
    7
      Marlin/src/HAL/HAL_STM32F7/watchdog_STM32F7.h
  65. 1
    9
      Marlin/src/HAL/HAL_TEENSY35_36/HAL.h
  66. 22
    4
      Marlin/src/HAL/HAL_TEENSY35_36/HAL_Servo_Teensy.h
  67. 20
    25
      Marlin/src/HAL/HAL_TEENSY35_36/HAL_timers_Teensy.h
  68. 1
    5
      Marlin/src/HAL/HAL_TEENSY35_36/endstop_interrupts.h
  69. 1
    5
      Marlin/src/HAL/HAL_TEENSY35_36/fastio_Teensy.h
  70. 2
    6
      Marlin/src/HAL/HAL_TEENSY35_36/spi_pins.h
  71. 1
    9
      Marlin/src/HAL/HAL_TEENSY35_36/watchdog_Teensy.h
  72. 22
    8
      Marlin/src/HAL/platforms.h
  73. 1
    5
      Marlin/src/HAL/shared/HAL_SPI.h
  74. 1
    5
      Marlin/src/HAL/shared/backtrace/backtrace.h
  75. 1
    4
      Marlin/src/HAL/shared/backtrace/unwarm.h
  76. 1
    4
      Marlin/src/HAL/shared/backtrace/unwarmbytab.h
  77. 1
    5
      Marlin/src/HAL/shared/backtrace/unwarmmem.h
  78. 1
    4
      Marlin/src/HAL/shared/backtrace/unwinder.h
  79. 1
    5
      Marlin/src/HAL/shared/backtrace/unwmemaccess.h
  80. 1
    5
      Marlin/src/HAL/shared/math_32bit.h
  81. 1
    5
      Marlin/src/HAL/shared/servo_private.h
  82. 1
    4
      Marlin/src/Marlin.h
  83. 1
    5
      Marlin/src/core/boards.h
  84. 1
    5
      Marlin/src/core/enum.h
  85. 1
    5
      Marlin/src/core/serial.h
  86. 1
    5
      Marlin/src/core/utility.h
  87. 1
    5
      Marlin/src/feature/I2CPositionEncoder.h
  88. 1
    5
      Marlin/src/feature/baricuda.h
  89. 1
    5
      Marlin/src/feature/bedlevel/abl/abl.h
  90. 1
    5
      Marlin/src/feature/bedlevel/bedlevel.h
  91. 1
    5
      Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.h
  92. 1
    5
      Marlin/src/feature/bedlevel/ubl/ubl.h
  93. 1
    5
      Marlin/src/feature/caselight.h
  94. 1
    5
      Marlin/src/feature/controllerfan.h
  95. 22
    4
      Marlin/src/feature/dac/dac_dac084s085.h
  96. 1
    5
      Marlin/src/feature/dac/dac_mcp4728.h
  97. 1
    22
      Marlin/src/feature/dac/stepper_dac.h
  98. 1
    5
      Marlin/src/feature/digipot/digipot.h
  99. 1
    5
      Marlin/src/feature/fanmux.h
  100. 0
    0
      Marlin/src/feature/filwidth.h

+ 1
- 5
Marlin/src/HAL/HAL_AVR/HAL.h Ver arquivo

@@ -16,9 +16,7 @@
16 16
  * You should have received a copy of the GNU General Public License
17 17
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 18
  */
19
-
20
-#ifndef _HAL_AVR_H_
21
-#define _HAL_AVR_H_
19
+#pragma once
22 20
 
23 21
 // --------------------------------------------------------------------------
24 22
 // Includes
@@ -374,5 +372,3 @@ inline void HAL_adc_init(void) {
374 372
 
375 373
 // AVR compatibility
376 374
 #define strtof strtod
377
-
378
-#endif // _HAL_AVR_H_

+ 1
- 5
Marlin/src/HAL/HAL_AVR/MarlinSerial.h Ver arquivo

@@ -19,6 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
+#pragma once
22 23
 
23 24
 /**
24 25
  * MarlinSerial.h - Hardware serial library for Wiring
@@ -30,9 +31,6 @@
30 31
  * Templatized 01 October 2018 by Eduardo José Tagle to allow multiple instances
31 32
  */
32 33
 
33
-#ifndef _MARLINSERIAL_H_
34
-#define _MARLINSERIAL_H_
35
-
36 34
 #include "../shared/MarlinSerial.h"
37 35
 
38 36
 #include <WString.h>
@@ -281,5 +279,3 @@
281 279
 #if defined(USBCON) && ENABLED(BLUETOOTH)
282 280
   extern HardwareSerial bluetoothSerial;
283 281
 #endif
284
-
285
-#endif // _MARLINSERIAL_H_

+ 1
- 5
Marlin/src/HAL/HAL_AVR/SanityCheck.h Ver arquivo

@@ -19,9 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
-
23
-#ifndef _SANITYCHECK_AVR_8_BIT_H_
24
-#define _SANITYCHECK_AVR_8_BIT_H_
22
+#pragma once
25 23
 
26 24
 /**
27 25
  * Test AVR specific configuration values for errors at compile-time.
@@ -116,5 +114,3 @@
116 114
     || defined(E4_HARDWARE_SERIAL) )
117 115
   #error "Select hardware UART for TMC2208 to use both TMC2208 and ENDSTOP_INTERRUPTS_FEATURE."
118 116
 #endif
119
-
120
-#endif // _SANITYCHECK_AVR_8_BIT_H_

+ 1
- 5
Marlin/src/HAL/HAL_AVR/ServoTimers.h Ver arquivo

@@ -19,6 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
+#pragma once
22 23
 
23 24
 /**
24 25
  * ServoTimers.h - Interrupt driven Servo library for Arduino using 16 bit timers- Version 2
@@ -39,9 +40,6 @@
39 40
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
40 41
  */
41 42
 
42
-#ifndef _SERVOTIMERS_H_
43
-#define _SERVOTIMERS_H_
44
-
45 43
 /**
46 44
  * Defines for 16 bit timers used with  Servo library
47 45
  *
@@ -91,5 +89,3 @@ typedef enum {
91 89
   #endif
92 90
   _Nbr_16timers
93 91
 } timer16_Sequence_t;
94
-
95
-#endif // _SERVOTIMERS_H_

+ 1
- 5
Marlin/src/HAL/HAL_AVR/endstop_interrupts.h Ver arquivo

@@ -19,6 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
+#pragma once
22 23
 
23 24
 /**
24 25
  * Endstop Interrupts
@@ -35,9 +36,6 @@
35 36
  * (Located in Marlin/buildroot/share/pin_interrupt_test/pin_interrupt_test.ino)
36 37
  */
37 38
 
38
-#ifndef _ENDSTOP_INTERRUPTS_H_
39
-#define _ENDSTOP_INTERRUPTS_H_
40
-
41 39
 #include "../../core/macros.h"
42 40
 #include <stdint.h>
43 41
 #include "../../module/endstops.h"
@@ -256,5 +254,3 @@ void setup_endstop_interrupts( void ) {
256 254
 
257 255
   // If we arrive here without raising an assertion, each pin has either an EXT-interrupt or a PCI.
258 256
 }
259
-
260
-#endif // _ENDSTOP_INTERRUPTS_H_

+ 1
- 5
Marlin/src/HAL/HAL_AVR/fastio_1280.h Ver arquivo

@@ -19,6 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
+#pragma once
22 23
 
23 24
 /**
24 25
  * Pin mapping for the 1280 and 2560
@@ -28,9 +29,6 @@
28 29
  *   Logical Pin   : 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx
29 30
  */
30 31
 
31
-#ifndef _FASTIO_1280_H_
32
-#define _FASTIO_1280_H_
33
-
34 32
 #include "fastio_AVR.h"
35 33
 
36 34
 // change for your board
@@ -1111,5 +1109,3 @@
1111 1109
 #define PL7_WPORT   PORTL
1112 1110
 #define PL7_DDR     DDRL
1113 1111
 #define PL7_PWM     NULL
1114
-
1115
-#endif // _FASTIO_1280_H_

+ 1
- 5
Marlin/src/HAL/HAL_AVR/fastio_1281.h Ver arquivo

@@ -19,6 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
+#pragma once
22 23
 
23 24
 /**
24 25
  * Pin mapping for the 1281 and 2561
@@ -27,9 +28,6 @@
27 28
  *   Port:        A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7 G0 G1 G2 G3 G4 G5
28 29
  */
29 30
 
30
-#ifndef _FASTIO_1281_H_
31
-#define _FASTIO_1281_H_
32
-
33 31
 #include "fastio_AVR.h"
34 32
 
35 33
 // change for your board
@@ -715,5 +713,3 @@
715 713
 #define PG5_WPORT   PORTG
716 714
 #define PG5_DDR     DDRG
717 715
 #define PG5_PWM     &OCR0B
718
-
719
-#endif // _FASTIO_1281_H_

+ 1
- 5
Marlin/src/HAL/HAL_AVR/fastio_168.h Ver arquivo

@@ -19,6 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
+#pragma once
22 23
 
23 24
 /**
24 25
  * Pin mapping for the 168, 328, and 328P
@@ -27,9 +28,6 @@
27 28
  *   Port:        B0 B1 B2 B3 B4 B5 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7
28 29
  */
29 30
 
30
-#ifndef _FASTIO_168_H_
31
-#define _FASTIO_168_H_
32
-
33 31
 #include "fastio_AVR.h"
34 32
 
35 33
 #define DEBUG_LED   AIO5
@@ -357,5 +355,3 @@
357 355
 #define PD7_WPORT   PORTD
358 356
 #define PD7_DDR     DDRD
359 357
 #define PD7_PWM     NULL
360
-
361
-#endif // _FASTIO_168_H_

+ 1
- 5
Marlin/src/HAL/HAL_AVR/fastio_644.h Ver arquivo

@@ -19,6 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
+#pragma once
22 23
 
23 24
 /**
24 25
  * Pin mapping for the 644, 644p, 644pa, and 1284p
@@ -53,9 +54,6 @@
53 54
  *                        +--------+
54 55
  */
55 56
 
56
-#ifndef _FASTIO_644_H_
57
-#define _FASTIO_644_H_
58
-
59 57
 #include "fastio_AVR.h"
60 58
 
61 59
 #define DEBUG_LED   DIO0
@@ -552,5 +550,3 @@
552 550
 #define PD7_WPORT   PORTD
553 551
 #define PD7_DDR     DDRD
554 552
 #define PD7_PWM     OCR2A
555
-
556
-#endif // _FASTIO_644_H_

+ 1
- 5
Marlin/src/HAL/HAL_AVR/fastio_AT90USB.h Ver arquivo

@@ -19,6 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
+#pragma once
22 23
 
23 24
 /**
24 25
  * Pin mapping (Teensy) for AT90USB646, 647, 1286, and 1287
@@ -28,9 +29,6 @@
28 29
  *            The logical pins 46 and 47 are not supported by Teensyduino, but are supported below as E2 and E3
29 30
  */
30 31
 
31
-#ifndef _FASTIO_AT90USB_H_
32
-#define _FASTIO_AT90USB_H_
33
-
34 32
 #include "fastio_AVR.h"
35 33
 
36 34
 // change for your board
@@ -697,5 +695,3 @@
697 695
 #define TIMER3A 5
698 696
 #define TIMER3B 4
699 697
 #define TIMER3C 3
700
-
701
-#endif // _FASTIO_AT90USB_H_

+ 1
- 5
Marlin/src/HAL/HAL_AVR/fastio_AVR.h Ver arquivo

@@ -19,6 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
+#pragma once
22 23
 
23 24
 /**
24 25
  * Fast I/O Routines for AVR
@@ -26,9 +27,6 @@
26 27
  * Contributed by Triffid_Hunter and modified by Kliment, thinkyhead, Bob-the-Kuhn, et.al.
27 28
  */
28 29
 
29
-#ifndef _FASTIO_ARDUINO_H_
30
-#define _FASTIO_ARDUINO_H_
31
-
32 30
 #include <avr/io.h>
33 31
 #include "../../core/macros.h"
34 32
 
@@ -312,5 +310,3 @@ enum ClockSource2 : char {
312 310
 
313 311
 // finally - the macro that tells us if a pin is an available hardware PWM
314 312
 #define USEABLE_HARDWARE_PWM(p) (PWM_PINS(p) && !PWM_CHK(p))
315
-
316
-#endif // _FASTIO_ARDUINO_H_

+ 1
- 5
Marlin/src/HAL/HAL_AVR/math_AVR.h Ver arquivo

@@ -19,9 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
-
23
-#ifndef _MATH_AVR_H_
24
-#define _MATH_AVR_H_
22
+#pragma once
25 23
 
26 24
 /**
27 25
  * Optimized math functions for AVR
@@ -113,5 +111,3 @@ static FORCE_INLINE uint16_t MultiU16X8toH16(uint8_t charIn1, uint16_t intIn2) {
113 111
   );
114 112
   return intRes;
115 113
 }
116
-
117
-#endif // _MATH_AVR_H_

+ 1
- 5
Marlin/src/HAL/HAL_AVR/pinsDebug.h Ver arquivo

@@ -19,14 +19,12 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
+#pragma once
22 23
 
23 24
 /**
24 25
  * PWM print routines for Atmel 8 bit AVR CPUs
25 26
  */
26 27
 
27
-#ifndef _PINSDEBUG_AVR_8_BIT_
28
-#define _PINSDEBUG_AVR_8_BIT_
29
-
30 28
 #include "../../inc/MarlinConfig.h"
31 29
 
32 30
 #define NUMBER_PINS_TOTAL NUM_DIGITAL_PINS
@@ -406,5 +404,3 @@ static void pwm_details(uint8_t pin) {
406 404
 #endif
407 405
 
408 406
 #define PRINT_PIN(p) do {sprintf_P(buffer, PSTR("%3d "), p); SERIAL_ECHO(buffer);} while (0)
409
-
410
-#endif // _PINSDEBUG_AVR_8_BIT_

+ 1
- 5
Marlin/src/HAL/HAL_AVR/pinsDebug_Teensyduino.h Ver arquivo

@@ -19,9 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
-
23
-#ifndef _PINSDEBUG_TEENSYSUINO_H_
24
-#define _PINSDEBUG_TEENSYSUINO_H_
22
+#pragma once
25 23
 
26 24
 //
27 25
 //  some of the pin mapping functions of the Teensduino extension to the Arduino IDE
@@ -111,5 +109,3 @@ const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
111 109
                                              // disable the PWMs so we can use it as is
112 110
 
113 111
 // portModeRegister(pin) is OK
114
-
115
-#endif // _PINSDEBUG_TEENSYSUINO_H_

+ 1
- 6
Marlin/src/HAL/HAL_AVR/pinsDebug_plus_70.h Ver arquivo

@@ -20,14 +20,12 @@
20 20
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
21 21
  *
22 22
  */
23
+#pragma once
23 24
 
24 25
 /**
25 26
  * Structures for 2560 family boards that use more than 70 pins
26 27
  */
27 28
 
28
-#ifndef _PINSDEBUG_PLUS_70_H_
29
-#define _PINSDEBUG_PLUS_70_H_
30
-
31 29
 #undef NUM_DIGITAL_PINS
32 30
 #if MB(BQ_ZUM_MEGA_3D)
33 31
   #define NUM_DIGITAL_PINS            85
@@ -336,6 +334,3 @@ const uint8_t PROGMEM digital_pin_to_timer_PGM_plus_70[] = {
336 334
  *  PCINT14 J5 76
337 335
  *  PCINT15 J6 77
338 336
  */
339
-
340
-
341
-#endif // _PINSDEBUG_PLUS_70_H_

+ 1
- 6
Marlin/src/HAL/HAL_AVR/spi_pins.h Ver arquivo

@@ -19,9 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
-
23
-#ifndef _SPI_PINS_H_
24
-#define _SPI_PINS_H_
22
+#pragma once
25 23
 
26 24
 /**
27 25
  * Define SPI Pins: SCK, MISO, MOSI, SS
@@ -65,6 +63,3 @@
65 63
 #ifndef SS_PIN
66 64
   #define SS_PIN   AVR_SS_PIN
67 65
 #endif
68
-
69
-
70
-#endif // _SPI_PINS_H_

+ 1
- 5
Marlin/src/HAL/HAL_AVR/watchdog_AVR.h Ver arquivo

@@ -19,9 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
-
23
-#ifndef _WATCHDOG_AVR_H_
24
-#define _WATCHDOG_AVR_H_
22
+#pragma once
25 23
 
26 24
 #include <avr/wdt.h>
27 25
 
@@ -31,5 +29,3 @@ void watchdog_init();
31 29
 // Reset watchdog. MUST be called at least every 4 seconds after the
32 30
 // first watchdog_init or AVR will go into emergency procedures.
33 31
 inline void watchdog_reset() { wdt_reset(); }
34
-
35
-#endif // _WATCHDOG_AVR_H_

+ 1
- 5
Marlin/src/HAL/HAL_DUE/HAL.h Ver arquivo

@@ -19,6 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
+#pragma once
22 23
 
23 24
 /**
24 25
  * Description: HAL for Arduino Due and compatible (SAM3X8E)
@@ -26,9 +27,6 @@
26 27
  * For ARDUINO_ARCH_SAM
27 28
  */
28 29
 
29
-#ifndef _HAL_DUE_H
30
-#define _HAL_DUE_H
31
-
32 30
 #define CPU_32_BIT
33 31
 
34 32
 #include <stdint.h>
@@ -189,5 +187,3 @@ char *dtostrf (double __val, signed char __width, unsigned char __prec, char *__
189 187
 #ifdef __cplusplus
190 188
   }
191 189
 #endif
192
-
193
-#endif // _HAL_DUE_H

+ 1
- 5
Marlin/src/HAL/HAL_DUE/HAL_timers_Due.h Ver arquivo

@@ -18,6 +18,7 @@
18 18
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
19 19
  *
20 20
  */
21
+#pragma once
21 22
 
22 23
 /**
23 24
  * HAL for Arduino Due and compatible (SAM3X8E)
@@ -25,9 +26,6 @@
25 26
  * For ARDUINO_ARCH_SAM
26 27
  */
27 28
 
28
-#ifndef _HAL_TIMERS_DUE_H
29
-#define _HAL_TIMERS_DUE_H
30
-
31 29
 // --------------------------------------------------------------------------
32 30
 // Includes
33 31
 // --------------------------------------------------------------------------
@@ -120,5 +118,3 @@ FORCE_INLINE static void HAL_timer_isr_prologue(const uint8_t timer_num) {
120 118
 }
121 119
 
122 120
 #define HAL_timer_isr_epilogue(TIMER_NUM)
123
-
124
-#endif // _HAL_TIMERS_DUE_H

+ 1
- 6
Marlin/src/HAL/HAL_DUE/InterruptVectors_Due.h Ver arquivo

@@ -19,6 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
+#pragma once
22 23
 
23 24
 /**
24 25
  * InterruptVectors_Due.h
@@ -35,11 +36,6 @@
35 36
  * Copyright (c) 2017 Eduardo José Tagle. All right reserved
36 37
  */
37 38
 
38
-#ifndef INTERRUPTVECTORS_DUE_H
39
-#define INTERRUPTVECTORS_DUE_H
40
-
41
-#include "../../inc/MarlinConfig.h"
42
-
43 39
 #ifdef ARDUINO_ARCH_SAM
44 40
 
45 41
 // ISR handler type
@@ -49,4 +45,3 @@ typedef void (*pfnISR_Handler)(void);
49 45
 pfnISR_Handler install_isr(IRQn_Type irq, pfnISR_Handler newHandler);
50 46
 
51 47
 #endif // ARDUINO_ARCH_SAM
52
-#endif // INTERRUPTVECTORS_DUE_H

+ 1
- 4
Marlin/src/HAL/HAL_DUE/MarlinSerialUSB_Due.h Ver arquivo

@@ -19,15 +19,13 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
+#pragma once
22 23
 
23 24
 /**
24 25
  * MarlinSerialUSB_Due.h - Hardware Serial over USB (CDC) library for Arduino DUE
25 26
  * Copyright (c) 2017 Eduardo José Tagle. All right reserved
26 27
  */
27 28
 
28
-#ifndef MARLINSERIALUSB_DUE_H
29
-#define MARLINSERIALUSB_DUE_H
30
-
31 29
 #include "../../inc/MarlinConfig.h"
32 30
 
33 31
 #if SERIAL_PORT == -1
@@ -92,4 +90,3 @@ private:
92 90
 extern MarlinSerialUSB customizedSerial1;
93 91
 
94 92
 #endif // SERIAL_PORT == -1
95
-#endif // MARLINSERIAL_DUE_H

+ 1
- 5
Marlin/src/HAL/HAL_DUE/endstop_interrupts.h Ver arquivo

@@ -19,6 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
+#pragma once
22 23
 
23 24
 /**
24 25
  * Endstop Interrupts
@@ -34,9 +35,6 @@
34 35
  * (Located in Marlin/buildroot/share/pin_interrupt_test/pin_interrupt_test.ino)
35 36
  */
36 37
 
37
-#ifndef _ENDSTOP_INTERRUPTS_H_
38
-#define _ENDSTOP_INTERRUPTS_H_
39
-
40 38
 #include "../../module/endstops.h"
41 39
 
42 40
 // One ISR for all EXT-Interrupts
@@ -82,5 +80,3 @@ void setup_endstop_interrupts(void) {
82 80
     attachInterrupt(digitalPinToInterrupt(Z_MIN_PROBE_PIN), endstop_ISR, CHANGE);
83 81
   #endif
84 82
 }
85
-
86
-#endif //_ENDSTOP_INTERRUPTS_H_

+ 1
- 5
Marlin/src/HAL/HAL_DUE/fastio_Due.h Ver arquivo

@@ -19,6 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
+#pragma once
22 23
 
23 24
 /**
24 25
  * Fast I/O Routines for SAM3X8E
@@ -36,9 +37,6 @@
36 37
  * leads to less efficient compiled code!!
37 38
  */
38 39
 
39
-#ifndef _FASTIO_DUE_H
40
-#define _FASTIO_DUE_H
41
-
42 40
 #include <pins_arduino.h>
43 41
 
44 42
 /**
@@ -495,5 +493,3 @@
495 493
   #define DIO100_PIN 11
496 494
   #define DIO100_WPORT PIOC
497 495
 #endif
498
-
499
-#endif // _FASTIO_DUE_H

+ 1
- 5
Marlin/src/HAL/HAL_DUE/spi_pins.h Ver arquivo

@@ -19,9 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
-
23
-#ifndef SPI_PINS_H_
24
-#define SPI_PINS_H_
22
+#pragma once
25 23
 
26 24
 /**
27 25
  * Define SPI Pins: SCK, MISO, MOSI, SS
@@ -61,5 +59,3 @@
61 59
 
62 60
 /* A.28, A.29, B.21, C.26, C.29 */
63 61
 #define SS_PIN            SDSS
64
-
65
-#endif /* SPI_PINS_H_ */

+ 3
- 9
Marlin/src/HAL/HAL_DUE/usb/arduino_due_x.h Ver arquivo

@@ -40,15 +40,12 @@
40 40
  * \asf_license_stop
41 41
  *
42 42
  */
43
-/*
43
+#pragma once
44
+
45
+/**
44 46
  * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
45 47
  */
46 48
 
47
-#ifndef ARDUINO_DUE_X_H_INCLUDED
48
-#define ARDUINO_DUE_X_H_INCLUDED
49
-
50
-/* ------------------------------------------------------------------------ */
51
-
52 49
 /**
53 50
  *  \page arduino_due_x_opfreq "Arduino Due/X - Operating frequencies"
54 51
  *  This page lists several definition related to the board operating frequency
@@ -98,6 +95,3 @@
98 95
 /*! Active level of the USB_VBOF output pin. */
99 96
 #define USB_VBOF_ACTIVE_LEVEL       LOW
100 97
 /* ------------------------------------------------------------------------ */
101
-
102
-
103
-#endif /* ARDUINO_DUE_X_H_INCLUDED */

+ 1
- 5
Marlin/src/HAL/HAL_DUE/watchdog_Due.h Ver arquivo

@@ -19,9 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
-
23
-#ifndef WATCHDOG_DUE_H
24
-#define WATCHDOG_DUE_H
22
+#pragma once
25 23
 
26 24
 // Arduino Due core now has watchdog support
27 25
 
@@ -33,5 +31,3 @@ void watchdog_init();
33 31
 // Reset watchdog. MUST be called at least every 4 seconds after the
34 32
 // first watchdog_init or AVR will go into emergency procedures.
35 33
 inline void watchdog_reset() { watchdogReset(); }
36
-
37
-#endif // WATCHDOG_DUE_H

+ 1
- 5
Marlin/src/HAL/HAL_ESP32/HAL.h Ver arquivo

@@ -16,14 +16,12 @@
16 16
  * You should have received a copy of the GNU General Public License
17 17
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 18
  */
19
+#pragma once
19 20
 
20 21
 /**
21 22
  * Description: HAL for Espressif ESP32 WiFi
22 23
  */
23 24
 
24
-#ifndef _HAL_ESP32_H
25
-#define _HAL_ESP32_H
26
-
27 25
 #define CPU_32_BIT
28 26
 
29 27
 // --------------------------------------------------------------------------
@@ -123,5 +121,3 @@ void HAL_adc_start_conversion (uint8_t adc_pin);
123 121
 #define HAL_INIT 1
124 122
 void HAL_idletask(void);
125 123
 void HAL_init(void);
126
-
127
-#endif // _HAL_ESP32_H

+ 1
- 5
Marlin/src/HAL/HAL_ESP32/HAL_timers_ESP32.h Ver arquivo

@@ -19,9 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
-
23
-#ifndef _HAL_TIMERS_ESP32_H
24
-#define _HAL_TIMERS_ESP32_H
22
+#pragma once
25 23
 
26 24
 // --------------------------------------------------------------------------
27 25
 // Includes
@@ -104,5 +102,3 @@ bool HAL_timer_interrupt_enabled(const uint8_t timer_num);
104 102
 
105 103
 #define HAL_timer_isr_prologue(TIMER_NUM)
106 104
 #define HAL_timer_isr_epilogue(TIMER_NUM)
107
-
108
-#endif // _HAL_TIMERS_ESP32_H

+ 1
- 5
Marlin/src/HAL/HAL_ESP32/endstop_interrupts.h Ver arquivo

@@ -19,6 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
+#pragma once
22 23
 
23 24
 /**
24 25
  * Endstop Interrupts
@@ -34,9 +35,6 @@
34 35
  * (Located in Marlin/buildroot/share/pin_interrupt_test/pin_interrupt_test.ino)
35 36
  */
36 37
 
37
-#ifndef _ENDSTOP_INTERRUPTS_H_
38
-#define _ENDSTOP_INTERRUPTS_H_
39
-
40 38
 #include "../../module/endstops.h"
41 39
 
42 40
 // One ISR for all EXT-Interrupts
@@ -77,5 +75,3 @@ void setup_endstop_interrupts(void) {
77 75
     attachInterrupt(digitalPinToInterrupt(Z_MIN_PROBE_PIN), endstop_ISR, CHANGE);
78 76
   #endif
79 77
 }
80
-
81
-#endif //_ENDSTOP_INTERRUPTS_H_

+ 1
- 9
Marlin/src/HAL/HAL_ESP32/fastio_ESP32.h Ver arquivo

@@ -19,9 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
-
23
-#ifndef _FASTIO_ESP32_H
24
-#define _FASTIO_ESP32_H
22
+#pragma once
25 23
 
26 24
 /**
27 25
  * Utility functions
@@ -64,9 +62,3 @@
64 62
 // TWI (I2C)
65 63
 #define SCL        5
66 64
 #define SDA        4
67
-
68
-//
69
-// pins
70
-//
71
-
72
-#endif // _FASTIO_ESP32_H

+ 1
- 5
Marlin/src/HAL/HAL_ESP32/ota.h Ver arquivo

@@ -16,11 +16,7 @@
16 16
  * You should have received a copy of the GNU General Public License
17 17
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 18
  */
19
-
20
-#ifndef _HAL_OTA_H
21
-#define _HAL_OTA_H
19
+#pragma once
22 20
 
23 21
 void OTA_init();
24 22
 void OTA_handle();
25
-
26
-#endif

+ 1
- 5
Marlin/src/HAL/HAL_ESP32/spi_pins.h Ver arquivo

@@ -16,13 +16,9 @@
16 16
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17 17
  *
18 18
  */
19
-
20
-#ifndef SPI_PINS_H_
21
-#define SPI_PINS_H_
19
+#pragma once
22 20
 
23 21
 #define SS_PIN    5
24 22
 #define SCK_PIN  18
25 23
 #define MISO_PIN 19
26 24
 #define MOSI_PIN 23
27
-
28
-#endif // SPI_PINS_H_

+ 2
- 6
Marlin/src/HAL/HAL_ESP32/watchdog_ESP32.h Ver arquivo

@@ -19,14 +19,10 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
-
23
-#ifndef WATCHDOG_ESP32_H
24
-#define WATCHDOG_ESP32_H
22
+#pragma once
25 23
 
26 24
 // Initialize watchdog with a 4 second interrupt time
27 25
 void watchdog_init();
28 26
 
29 27
 // Reset watchdog.
30
-inline void watchdog_reset() {};
31
-
32
-#endif // WATCHDOG_ESP32_H
28
+inline void watchdog_reset() { }

+ 1
- 5
Marlin/src/HAL/HAL_LPC1768/HAL.h Ver arquivo

@@ -19,15 +19,13 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
+#pragma once
22 23
 
23 24
 /**
24 25
  * HAL_LPC1768/HAL.h
25 26
  * Hardware Abstraction Layer for NXP LPC1768
26 27
  */
27 28
 
28
-#ifndef _HAL_LPC1768_H_
29
-#define _HAL_LPC1768_H_
30
-
31 29
 #define CPU_32_BIT
32 30
 #define HAL_INIT
33 31
 
@@ -156,5 +154,3 @@ int16_t PARSED_PIN_INDEX(const char code, const int16_t dval);
156 154
 
157 155
 #define HAL_IDLETASK 1
158 156
 void HAL_idletask(void);
159
-
160
-#endif // _HAL_LPC1768_H_

+ 1
- 5
Marlin/src/HAL/HAL_LPC1768/HAL_timers.h Ver arquivo

@@ -18,15 +18,13 @@
18 18
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
19 19
  *
20 20
  */
21
+#pragma once
21 22
 
22 23
 /**
23 24
  *
24 25
  * HAL For LPC1768
25 26
  */
26 27
 
27
-#ifndef _HAL_TIMERS_H
28
-#define _HAL_TIMERS_H
29
-
30 28
 // --------------------------------------------------------------------------
31 29
 // Includes
32 30
 // --------------------------------------------------------------------------
@@ -166,5 +164,3 @@ FORCE_INLINE static void HAL_timer_isr_prologue(const uint8_t timer_num) {
166 164
 }
167 165
 
168 166
 #define HAL_timer_isr_epilogue(TIMER_NUM)
169
-
170
-#endif // _HAL_TIMERS_H

+ 1
- 5
Marlin/src/HAL/HAL_LPC1768/MarlinSerial.h Ver arquivo

@@ -19,9 +19,8 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
+#pragma once
22 23
 
23
-#ifndef MARLINSERIAL_H
24
-#define MARLINSERIAL_H
25 24
 #include <HardwareSerial.h>
26 25
 #include <WString.h>
27 26
 
@@ -33,7 +32,6 @@
33 32
 #ifndef SERIAL_PORT
34 33
   #define SERIAL_PORT 0
35 34
 #endif
36
-
37 35
 #ifndef RX_BUFFER_SIZE
38 36
   #define RX_BUFFER_SIZE 128
39 37
 #endif
@@ -67,5 +65,3 @@ extern MarlinSerial MSerial;
67 65
 extern MarlinSerial MSerial1;
68 66
 extern MarlinSerial MSerial2;
69 67
 extern MarlinSerial MSerial3;
70
-
71
-#endif // MARLINSERIAL_H

+ 2
- 6
Marlin/src/HAL/HAL_LPC1768/MarlinServo.h Ver arquivo

@@ -38,6 +38,7 @@
38 38
  * License along with this library; if not, write to the Free Software
39 39
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
40 40
  */
41
+#pragma once
41 42
 
42 43
 /**
43 44
  * Based on "servo.h - Interrupt driven Servo library for Arduino using 16 bit timers -
@@ -47,12 +48,9 @@
47 48
  *
48 49
  */
49 50
 
50
-#ifndef SERVO_PRIVATE_H
51
-#define SERVO_PRIVATE_H
52
-
53 51
 #include <Servo.h>
54 52
 
55
-class MarlinServo: public Servo  {
53
+class MarlinServo: public Servo {
56 54
   public:
57 55
   void move(const int value) {
58 56
     constexpr uint16_t servo_delay[] = SERVO_DELAY;
@@ -70,5 +68,3 @@ class MarlinServo: public Servo  {
70 68
 };
71 69
 
72 70
 #define HAL_SERVO_LIB MarlinServo
73
-
74
-#endif // SERVO_PRIVATE_H

+ 1
- 5
Marlin/src/HAL/HAL_LPC1768/endstop_interrupts.h Ver arquivo

@@ -19,6 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
+#pragma once
22 23
 
23 24
 /**
24 25
  * Endstop Interrupts
@@ -34,9 +35,6 @@
34 35
  * (Located in Marlin/buildroot/share/pin_interrupt_test/pin_interrupt_test.ino)
35 36
  */
36 37
 
37
-#ifndef _ENDSTOP_INTERRUPTS_H_
38
-#define _ENDSTOP_INTERRUPTS_H_
39
-
40 38
 #include "../../module/endstops.h"
41 39
 
42 40
 // One ISR for all EXT-Interrupts
@@ -104,5 +102,3 @@ void setup_endstop_interrupts(void) {
104 102
     attachInterrupt(digitalPinToInterrupt(Z_MIN_PROBE_PIN), endstop_ISR, CHANGE);
105 103
   #endif
106 104
 }
107
-
108
-#endif //_ENDSTOP_INTERRUPTS_H_

+ 1
- 5
Marlin/src/HAL/HAL_LPC1768/fastio.h Ver arquivo

@@ -19,6 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
+#pragma once
22 23
 
23 24
 /**
24 25
  * Fast I/O Routines for LPC1768/9
@@ -32,9 +33,6 @@
32 33
  * For TARGET LPC1768
33 34
  */
34 35
 
35
-#ifndef _FASTIO_LPC1768_H
36
-#define _FASTIO_LPC1768_H
37
-
38 36
 #include <Arduino.h>
39 37
 
40 38
 #define USEABLE_HARDWARE_PWM(pin) TRUE // all pins are PWM capable
@@ -123,5 +121,3 @@
123 121
 
124 122
 // Shorthand
125 123
 #define OUT_WRITE(IO,V)   do{ SET_OUTPUT(IO); WRITE(IO,V); }while(0)
126
-
127
-#endif // _FASTIO_LPC1768_H

+ 1
- 5
Marlin/src/HAL/HAL_LPC1768/include/digipot_mcp4451_I2C_routines.h Ver arquivo

@@ -19,13 +19,11 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
+#pragma once
22 23
 
23 24
 // adapted from  I2C/master/master.c example
24 25
 //   https://www-users.cs.york.ac.uk/~pcc/MCP/HAPR-Course-web/CMSIS/examples/html/master_8c_source.html
25 26
 
26
-#ifndef _DIGIPOT_MCP4451_I2C_ROUTINES_H_
27
-#define _DIGIPOT_MCP4451_I2C_ROUTINES_H_
28
-
29 27
 #define USEDI2CDEV_M  1  // use I2C1 controller
30 28
 
31 29
 #if USEDI2CDEV_M == 0
@@ -53,5 +51,3 @@ uint8_t digipot_mcp4451_send_byte(uint8_t data);
53 51
 #ifdef __cplusplus
54 52
   }
55 53
 #endif
56
-
57
-#endif // _DIGIPOT_MCP4451_I2C_ROUTINES_H_

+ 1
- 5
Marlin/src/HAL/HAL_LPC1768/spi_pins.h Ver arquivo

@@ -19,9 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
-
23
-#ifndef SPI_PINS_LPC1768_H
24
-#define SPI_PINS_LPC1768_H
22
+#pragma once
25 23
 
26 24
 #include "src/core/macros.h"
27 25
 
@@ -54,5 +52,3 @@
54 52
   #undef SDSS
55 53
   #define SDSS              SS_PIN
56 54
 #endif
57
-
58
-#endif // SPI_PINS_LPC1768_H

+ 1
- 5
Marlin/src/HAL/HAL_LPC1768/watchdog.h Ver arquivo

@@ -19,9 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
-
23
-#ifndef WATCHDOG_LPC1768_H
24
-#define WATCHDOG_LPC1768_H
22
+#pragma once
25 23
 
26 24
 #define RST_POWER_ON   1
27 25
 #define RST_EXTERNAL   2
@@ -34,5 +32,3 @@ void watchdog_init(void);
34 32
 void watchdog_reset(void);
35 33
 void HAL_clear_reset_source(void);
36 34
 uint8_t HAL_get_reset_source(void);
37
-
38
-#endif /* WATCHDOG_H */

+ 1
- 5
Marlin/src/HAL/HAL_STM32F1/HAL.h Ver arquivo

@@ -20,14 +20,12 @@
20 20
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
21 21
  *
22 22
  */
23
+#pragma once
23 24
 
24 25
 /**
25 26
  * HAL for stm32duino.com based on Libmaple and compatible (STM32F1)
26 27
  */
27 28
 
28
-#ifndef _HAL_STM32F1_H
29
-#define _HAL_STM32F1_H
30
-
31 29
 #define CPU_32_BIT
32 30
 #undef DEBUG_NONE
33 31
 
@@ -251,5 +249,3 @@ void HAL_enable_AdcFreerun(void);
251 249
 
252 250
 #define JTAG_DISABLE() afio_cfg_debug_ports(AFIO_DEBUG_SW_ONLY)
253 251
 #define JTAGSWD_DISABLE() afio_cfg_debug_ports(AFIO_DEBUG_NONE)
254
-
255
-#endif // _HAL_STM32F1_H

+ 1
- 5
Marlin/src/HAL/HAL_STM32F1/HAL_Servo_Stm32f1.h Ver arquivo

@@ -20,9 +20,7 @@
20 20
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
21 21
  *
22 22
  */
23
-
24
-#ifndef HAL_SERVO_STM32F1_H
25
-#define HAL_SERVO_STM32F1_H
23
+#pragma once
26 24
 
27 25
 // Pin number of unattached pins
28 26
 #define NOT_ATTACHED                    (-1)
@@ -53,5 +51,3 @@ class libServo {
53 51
     int32_t minAngle;
54 52
     int32_t maxAngle;
55 53
 };
56
-
57
-#endif // HAL_SERVO_STM32F1_H

+ 1
- 5
Marlin/src/HAL/HAL_STM32F1/HAL_timers_Stm32f1.h Ver arquivo

@@ -19,14 +19,12 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
+#pragma once
22 23
 
23 24
 /**
24 25
  * HAL for stm32duino.com based on Libmaple and compatible (STM32F1)
25 26
  */
26 27
 
27
-#ifndef _HAL_TIMERS_STM32F1_H
28
-#define _HAL_TIMERS_STM32F1_H
29
-
30 28
 // --------------------------------------------------------------------------
31 29
 // Includes
32 30
 // --------------------------------------------------------------------------
@@ -167,5 +165,3 @@ FORCE_INLINE static void HAL_timer_isr_prologue(const uint8_t timer_num) {
167 165
 }
168 166
 
169 167
 #define HAL_timer_isr_epilogue(TIMER_NUM)
170
-
171
-#endif // _HAL_TIMERS_STM32F1_H

+ 1
- 5
Marlin/src/HAL/HAL_STM32F1/endstop_interrupts.h Ver arquivo

@@ -20,6 +20,7 @@
20 20
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
21 21
  *
22 22
  */
23
+#pragma once
23 24
 
24 25
 /**
25 26
  * Endstop interrupts for Libmaple STM32F1 based targets.
@@ -46,9 +47,6 @@
46 47
  * (Located in Marlin/buildroot/share/pin_interrupt_test/pin_interrupt_test.ino)
47 48
  */
48 49
 
49
-#ifndef _ENDSTOP_INTERRUPTS_H_
50
-#define _ENDSTOP_INTERRUPTS_H_
51
-
52 50
 #include "../../module/endstops.h"
53 51
 
54 52
 // One ISR for all EXT-Interrupts
@@ -89,5 +87,3 @@ void setup_endstop_interrupts(void) {
89 87
     attachInterrupt(Z_MIN_PROBE_PIN, endstop_ISR, CHANGE);
90 88
   #endif
91 89
 }
92
-
93
-#endif //_ENDSTOP_INTERRUPTS_H_

+ 1
- 5
Marlin/src/HAL/HAL_STM32F1/fastio_Stm32f1.h Ver arquivo

@@ -20,15 +20,13 @@
20 20
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
21 21
  *
22 22
  */
23
+#pragma once
23 24
 
24 25
 /**
25 26
  * Fast I/O interfaces for STM32F1
26 27
  * These use GPIO functions instead of Direct Port Manipulation, as on AVR.
27 28
  */
28 29
 
29
-#ifndef _FASTIO_STM32F1_H
30
-#define _FASTIO_STM32F1_H
31
-
32 30
 #include <libmaple/gpio.h>
33 31
 
34 32
 #define READ(IO)              (PIN_MAP[IO].gpio_device->regs->IDR & (1U << PIN_MAP[IO].gpio_bit) ? HIGH : LOW)
@@ -52,5 +50,3 @@
52 50
 
53 51
 #define PWM_PIN(p) true
54 52
 #define USEABLE_HARDWARE_PWM(p) PWM_PIN(p)
55
-
56
-#endif // _FASTIO_STM32F1_H

+ 1
- 5
Marlin/src/HAL/HAL_STM32F1/spi_pins.h Ver arquivo

@@ -16,14 +16,12 @@
16 16
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17 17
  *
18 18
  */
19
+#pragma once
19 20
 
20 21
 /**
21 22
  * HAL for stm32duino.com based on Libmaple and compatible (STM32F1)
22 23
  */
23 24
 
24
-#ifndef SPI_PINS_H_
25
-#define SPI_PINS_H_
26
-
27 25
 /**
28 26
  * Define SPI Pins: SCK, MISO, MOSI, SS
29 27
  *
@@ -33,5 +31,3 @@
33 31
 #define MISO_PIN  PA6
34 32
 #define MOSI_PIN  PA7
35 33
 #define SS_PIN    PA4
36
-
37
-#endif // SPI_PINS_H_

+ 1
- 5
Marlin/src/HAL/HAL_STM32F1/watchdog_Stm32f1.h Ver arquivo

@@ -19,14 +19,12 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
+#pragma once
22 23
 
23 24
 /**
24 25
  * HAL for stm32duino.com based on Libmaple and compatible (STM32F1)
25 26
  */
26 27
 
27
-#ifndef WATCHDOG_STM32F1_H
28
-#define WATCHDOG_STM32F1_H
29
-
30 28
 #include <libmaple/iwdg.h>
31 29
 
32 30
 #include "../../inc/MarlinConfig.h"
@@ -51,5 +49,3 @@ inline void watchdog_reset() {
51 49
   #endif
52 50
   iwdg_feed();
53 51
 }
54
-
55
-#endif // WATCHDOG_STM32F1_H

+ 1
- 6
Marlin/src/HAL/HAL_STM32F4/EEPROM_Emul/eeprom_emul.h Ver arquivo

@@ -45,10 +45,7 @@
45 45
   *
46 46
   ******************************************************************************
47 47
   */
48
-
49
-/* Define to prevent recursive inclusion -------------------------------------*/
50
-#ifndef __EEEPROM_EMUL_H
51
-#define __EEEPROM_EMUL_H
48
+#pragma once
52 49
 
53 50
 // --------------------------------------------------------------------------
54 51
 // Includes
@@ -112,6 +109,4 @@ uint16_t EE_Initialize(void);
112 109
 uint16_t EE_ReadVariable(uint16_t VirtAddress, uint16_t* Data);
113 110
 uint16_t EE_WriteVariable(uint16_t VirtAddress, uint16_t Data);
114 111
 
115
-#endif /* __EEEPROM_H */
116
-
117 112
 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 1
- 5
Marlin/src/HAL/HAL_STM32F4/HAL.h Ver arquivo

@@ -20,9 +20,7 @@
20 20
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
21 21
  *
22 22
  */
23
-
24
-#ifndef _HAL_STM32F4_H
25
-#define _HAL_STM32F4_H
23
+#pragma once
26 24
 
27 25
 #define CPU_32_BIT
28 26
 #undef DEBUG_NONE
@@ -251,5 +249,3 @@ void HAL_enable_AdcFreerun(void);
251 249
 
252 250
 #define JTAG_DISABLE() afio_cfg_debug_ports(AFIO_DEBUG_SW_ONLY)
253 251
 #define JTAGSWD_DISABLE() afio_cfg_debug_ports(AFIO_DEBUG_NONE)
254
-
255
-#endif // _HAL_STM32F4_H

+ 3
- 7
Marlin/src/HAL/HAL_STM32F4/HAL_Servo_STM32F4.h Ver arquivo

@@ -20,22 +20,18 @@
20 20
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
21 21
  *
22 22
  */
23
-
24
-#ifndef HAL_SERVO_STM32F4_H
25
-#define HAL_SERVO_STM32F4_H
23
+#pragma once
26 24
 
27 25
 #include <Servo.h>
28 26
 
29 27
 // Inherit and expand on the official library
30 28
 class libServo : public Servo {
31
-public:
29
+  public:
32 30
     int8_t attach(const int pin);
33 31
     int8_t attach(const int pin, const int min, const int max);
34 32
     void move(const int value);
35
-private:
33
+  private:
36 34
     uint16_t min_ticks;
37 35
     uint16_t max_ticks;
38 36
     uint8_t servoIndex;               // index into the channel data for this servo
39 37
 };
40
-
41
-#endif // HAL_SERVO_STM32F4_H

+ 1
- 5
Marlin/src/HAL/HAL_STM32F4/HAL_timers_STM32F4.h Ver arquivo

@@ -19,9 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
-
23
-#ifndef _HAL_TIMERS_STM32F4_H
24
-#define _HAL_TIMERS_STM32F4_H
22
+#pragma once
25 23
 
26 24
 // --------------------------------------------------------------------------
27 25
 // Includes
@@ -130,5 +128,3 @@ FORCE_INLINE static hal_timer_t HAL_timer_get_compare(const uint8_t timer_num) {
130 128
 #endif
131 129
 
132 130
 #define HAL_timer_isr_epilogue(TIMER_NUM)
133
-
134
-#endif // _HAL_TIMERS_STM32F4_H

+ 1
- 5
Marlin/src/HAL/HAL_STM32F4/endstop_interrupts.h Ver arquivo

@@ -20,9 +20,7 @@
20 20
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
21 21
  *
22 22
  */
23
-
24
-#ifndef _ENDSTOP_INTERRUPTS_H_
25
-#define _ENDSTOP_INTERRUPTS_H_
23
+#pragma once
26 24
 
27 25
 #include "../../module/endstops.h"
28 26
 
@@ -64,5 +62,3 @@ void setup_endstop_interrupts(void) {
64 62
     attachInterrupt(Z_MIN_PROBE_PIN, endstop_ISR, CHANGE);
65 63
   #endif
66 64
 }
67
-
68
-#endif //_ENDSTOP_INTERRUPTS_H_

+ 1
- 5
Marlin/src/HAL/HAL_STM32F4/fastio_STM32F4.h Ver arquivo

@@ -20,15 +20,13 @@
20 20
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
21 21
  *
22 22
  */
23
+#pragma once
23 24
 
24 25
 /**
25 26
  * Fast I/O interfaces for STM32F4
26 27
  * These use GPIO functions instead of Direct Port Manipulation, as on AVR.
27 28
  */
28 29
 
29
-#ifndef _FASTIO_STM32F4_H
30
-#define _FASTIO_STM32F4_H
31
-
32 30
 #undef _BV
33 31
 #define _BV(b) (1 << (b))
34 32
 
@@ -151,5 +149,3 @@
151 149
 #define PE13 _STM32_PIN(E, 13)
152 150
 #define PE14 _STM32_PIN(E, 14)
153 151
 #define PE15 _STM32_PIN(E, 15)
154
-
155
-#endif // _FASTIO_STM32F4_H

+ 1
- 7
Marlin/src/HAL/HAL_STM32F4/watchdog_STM32F4.h Ver arquivo

@@ -19,15 +19,9 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
-
23
-#ifndef WATCHDOG_STM32F4_H
24
-#define WATCHDOG_STM32F4_H
25
-
26
-#include "../../inc/MarlinConfig.h"
22
+#pragma once
27 23
 
28 24
 extern IWDG_HandleTypeDef hiwdg;
29 25
 
30 26
 void watchdog_init();
31 27
 void watchdog_reset();
32
-
33
-#endif // WATCHDOG_STM32F1_H

+ 1
- 6
Marlin/src/HAL/HAL_STM32F7/EEPROM_Emul/eeprom_emul.h Ver arquivo

@@ -45,10 +45,7 @@
45 45
   *
46 46
   ******************************************************************************
47 47
   */
48
-
49
-/* Define to prevent recursive inclusion -------------------------------------*/
50
-#ifndef __EEEPROM_EMUL_H
51
-#define __EEEPROM_EMUL_H
48
+#pragma once
52 49
 
53 50
 // --------------------------------------------------------------------------
54 51
 // Includes
@@ -113,6 +110,4 @@ uint16_t EE_Initialize(void);
113 110
 uint16_t EE_ReadVariable(uint16_t VirtAddress, uint16_t* Data);
114 111
 uint16_t EE_WriteVariable(uint16_t VirtAddress, uint16_t Data);
115 112
 
116
-#endif /* __EEEPROM_H */
117
-
118 113
 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 1
- 5
Marlin/src/HAL/HAL_STM32F7/HAL.h Ver arquivo

@@ -20,9 +20,7 @@
20 20
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
21 21
  *
22 22
  */
23
-
24
-#ifndef _HAL_STM32F7_H
25
-#define _HAL_STM32F7_H
23
+#pragma once
26 24
 
27 25
 #define CPU_32_BIT
28 26
 #undef DEBUG_NONE
@@ -234,5 +232,3 @@ void HAL_enable_AdcFreerun(void);
234 232
 #define GET_PIN_MAP_PIN(index) index
235 233
 #define GET_PIN_MAP_INDEX(pin) pin
236 234
 #define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval)
237
-
238
-#endif // _HAL_STM32F7_H

+ 1
- 5
Marlin/src/HAL/HAL_STM32F7/HAL_Servo_STM32F7.h Ver arquivo

@@ -20,9 +20,7 @@
20 20
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
21 21
  *
22 22
  */
23
-
24
-#ifndef HAL_SERVO_STM32F7_H
25
-#define HAL_SERVO_STM32F7_H
23
+#pragma once
26 24
 
27 25
 #include <../../libraries/Servo/src/Servo.h>
28 26
 
@@ -37,5 +35,3 @@ private:
37 35
     uint16_t max_ticks;
38 36
     uint8_t servoIndex;               // index into the channel data for this servo
39 37
 };
40
-
41
-#endif // HAL_SERVO_STM32F7_H

+ 1
- 5
Marlin/src/HAL/HAL_STM32F7/HAL_timers_STM32F7.h Ver arquivo

@@ -19,9 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
-
23
-#ifndef _HAL_TIMERS_STM32F7_H
24
-#define _HAL_TIMERS_STM32F7_H
22
+#pragma once
25 23
 
26 24
 // --------------------------------------------------------------------------
27 25
 // Includes
@@ -101,5 +99,3 @@ hal_timer_t HAL_timer_get_compare(const uint8_t timer_num);
101 99
 uint32_t HAL_timer_get_count(const uint8_t timer_num);
102 100
 void HAL_timer_isr_prologue(const uint8_t timer_num);
103 101
 #define HAL_timer_isr_epilogue(TIMER_NUM)
104
-
105
-#endif // _HAL_TIMERS_STM32F7_H

+ 2
- 7
Marlin/src/HAL/HAL_STM32F7/TMC2660.h Ver arquivo

@@ -24,12 +24,9 @@
24 24
  * THE SOFTWARE.
25 25
  *
26 26
  */
27
+#pragma once
27 28
 
28
-#include "../../inc/MarlinConfig.h"
29
-
30
-// ensure this library description is only included once
31
-#ifndef _TMC26XSTEPPER_H_
32
-#define _TMC26XSTEPPER_H_
29
+#include <stdint.h>
33 30
 
34 31
 //! return value for TMC26XStepper.getOverTemperature() if there is a overtemperature situation in the TMC chip
35 32
 /*!
@@ -601,5 +598,3 @@ class TMC26XStepper {
601 598
     // SPI sender
602 599
     inline void send262(uint32_t datagram);
603 600
 };
604
-
605
-#endif // _TMC26XSTEPPER_H_

+ 1
- 7
Marlin/src/HAL/HAL_STM32F7/endstop_interrupts.h Ver arquivo

@@ -20,11 +20,7 @@
20 20
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
21 21
  *
22 22
  */
23
-
24
-
25
-
26
-#ifndef _ENDSTOP_INTERRUPTS_H_
27
-#define _ENDSTOP_INTERRUPTS_H_
23
+#pragma once
28 24
 
29 25
 #include "../../module/endstops.h"
30 26
 
@@ -66,5 +62,3 @@ void setup_endstop_interrupts(void) {
66 62
     attachInterrupt(Z_MIN_PROBE_PIN, endstop_ISR, CHANGE);
67 63
   #endif
68 64
 }
69
-
70
-#endif //_ENDSTOP_INTERRUPTS_H_

+ 1
- 5
Marlin/src/HAL/HAL_STM32F7/fastio_STM32F7.h Ver arquivo

@@ -20,15 +20,13 @@
20 20
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
21 21
  *
22 22
  */
23
+#pragma once
23 24
 
24 25
 /**
25 26
  * Fast I/O interfaces for STM32F7
26 27
  * These use GPIO functions instead of Direct Port Manipulation, as on AVR.
27 28
  */
28 29
 
29
-#ifndef _FASTIO_STM32F7_H
30
-#define _FASTIO_STM32F7_H
31
-
32 30
 #define _BV(b) (1 << (b))
33 31
 
34 32
 #define READ(IO)                digitalRead(IO)
@@ -186,5 +184,3 @@
186 184
 #define PG13 _STM32_PIN(G, 13)
187 185
 #define PG14 _STM32_PIN(G, 14)
188 186
 #define PG15 _STM32_PIN(G, 15)
189
-
190
-#endif // _FASTIO_STM32F7_H

+ 1
- 7
Marlin/src/HAL/HAL_STM32F7/watchdog_STM32F7.h Ver arquivo

@@ -19,15 +19,9 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
-
23
-#ifndef WATCHDOG_STM32F7_H
24
-#define WATCHDOG_STM32F7_H
25
-
26
-#include "../../inc/MarlinConfig.h"
22
+#pragma once
27 23
 
28 24
 extern IWDG_HandleTypeDef hiwdg;
29 25
 
30 26
 void watchdog_init();
31 27
 void watchdog_reset();
32
-
33
-#endif // WATCHDOG_STM32F1_H

+ 1
- 9
Marlin/src/HAL/HAL_TEENSY35_36/HAL.h Ver arquivo

@@ -19,14 +19,12 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
+#pragma once
22 23
 
23 24
 /**
24 25
  * Description: HAL for Teensy 3.5 and Teensy 3.6
25 26
  */
26 27
 
27
-#ifndef _HAL_TEENSY_H
28
-#define _HAL_TEENSY_H
29
-
30 28
 #define CPU_32_BIT
31 29
 
32 30
 // --------------------------------------------------------------------------
@@ -167,9 +165,3 @@ uint16_t HAL_adc_get_result(void);
167 165
 #define GET_PIN_MAP_PIN(index) index
168 166
 #define GET_PIN_MAP_INDEX(pin) pin
169 167
 #define PARSED_PIN_INDEX(code, dval) parser.intval(code, dval)
170
-
171
-// --------------------------------------------------------------------------
172
-//
173
-// --------------------------------------------------------------------------
174
-
175
-#endif // _HAL_TEENSY_H

+ 22
- 4
Marlin/src/HAL/HAL_TEENSY35_36/HAL_Servo_Teensy.h Ver arquivo

@@ -1,5 +1,25 @@
1
-#ifndef _HAL_SERVO_TEENSY_H_
2
-#define _HAL_SERVO_TEENSY_H_
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+#pragma once
3 23
 
4 24
 #include <Servo.h>
5 25
 
@@ -14,5 +34,3 @@ class libServo : public Servo {
14 34
      uint16_t max_ticks;
15 35
      uint8_t servoIndex;               // index into the channel data for this servo
16 36
 };
17
-
18
-#endif // _HAL_SERVO_TEENSY_H_

+ 20
- 25
Marlin/src/HAL/HAL_TEENSY35_36/HAL_timers_Teensy.h Ver arquivo

@@ -1,23 +1,23 @@
1
-/* **************************************************************************
2
-
3
- Marlin 3D Printer Firmware
4
- Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
5
- Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
6
- Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
7
-
8
- This program is free software: you can redistribute it and/or modify
9
- it under the terms of the GNU General Public License as published by
10
- the Free Software Foundation, either version 3 of the License, or
11
- (at your option) any later version.
12
-
13
- This program is distributed in the hope that it will be useful,
14
- but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- GNU General Public License for more details.
17
-
18
- You should have received a copy of the GNU General Public License
19
- along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
-****************************************************************************/
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ * Copyright (c) 2016 Bob Cousins bobcousins42@googlemail.com
5
+ * Copyright (c) 2015-2016 Nico Tonnhofer wurstnase.reprap@gmail.com
6
+ *
7
+ * This program is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU General Public License as published by
9
+ * the Free Software Foundation, either version 3 of the License, or
10
+ * (at your option) any later version.
11
+ *
12
+ * This program is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
+ * GNU General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU General Public License
18
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
+ */
20
+#pragma once
21 21
 
22 22
 /**
23 23
  * Description: HAL for
@@ -25,9 +25,6 @@
25 25
  * Teensy3.6 (__MK66FX1M0__)
26 26
  */
27 27
 
28
-#ifndef _HAL_TIMERS_TEENSY_H
29
-#define _HAL_TIMERS_TEENSY_H
30
-
31 28
 // --------------------------------------------------------------------------
32 29
 // Includes
33 30
 // --------------------------------------------------------------------------
@@ -108,5 +105,3 @@ bool HAL_timer_interrupt_enabled(const uint8_t timer_num);
108 105
 
109 106
 void HAL_timer_isr_prologue(const uint8_t timer_num);
110 107
 #define HAL_timer_isr_epilogue(TIMER_NUM)
111
-
112
-#endif // _HAL_TIMERS_TEENSY_H

+ 1
- 5
Marlin/src/HAL/HAL_TEENSY35_36/endstop_interrupts.h Ver arquivo

@@ -19,6 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
+#pragma once
22 23
 
23 24
 /**
24 25
  * Endstop Interrupts
@@ -34,9 +35,6 @@
34 35
  * (Located in Marlin/buildroot/share/pin_interrupt_test/pin_interrupt_test.ino)
35 36
  */
36 37
 
37
-#ifndef _ENDSTOP_INTERRUPTS_H_
38
-#define _ENDSTOP_INTERRUPTS_H_
39
-
40 38
 #include "../../module/endstops.h"
41 39
 
42 40
 // One ISR for all EXT-Interrupts
@@ -81,5 +79,3 @@ void setup_endstop_interrupts( void ) {
81 79
     attachInterrupt(digitalPinToInterrupt(Z_MIN_PROBE_PIN), endstop_ISR, CHANGE);
82 80
   #endif
83 81
 }
84
-
85
-#endif //_ENDSTOP_INTERRUPTS_H_

+ 1
- 5
Marlin/src/HAL/HAL_TEENSY35_36/fastio_Teensy.h Ver arquivo

@@ -19,6 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
+#pragma once
22 23
 
23 24
 /**
24 25
  * Fast I/O Routines for Teensy 3.5 and Teensy 3.6
@@ -26,9 +27,6 @@
26 27
  * Contributed by Triffid_Hunter and modified by Kliment, thinkyhead, Bob-the-Kuhn, et.al.
27 28
  */
28 29
 
29
-#ifndef _FASTIO_TEENSY_H
30
-#define _FASTIO_TEENSY_H
31
-
32 30
 #ifndef MASK
33 31
   #define MASK(PIN) (1 << PIN)
34 32
 #endif
@@ -91,5 +89,3 @@
91 89
  */
92 90
 
93 91
 #define DIO0_PIN 8
94
-
95
-#endif  /* _FASTIO_TEENSY_H */

+ 2
- 6
Marlin/src/HAL/HAL_TEENSY35_36/spi_pins.h Ver arquivo

@@ -19,13 +19,9 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
-
23
-#ifndef SPI_PINS_H_
24
-#define SPI_PINS_H_
22
+#pragma once
25 23
 
26 24
 #define SCK_PIN   13
27 25
 #define MISO_PIN  12
28 26
 #define MOSI_PIN  11
29
-#define SS_PIN    20 //SDSS // A.28, A.29, B.21, C.26, C.29
30
-
31
-#endif /* SPI_PINS_H_ */
27
+#define SS_PIN    20 // SDSS // A.28, A.29, B.21, C.26, C.29

+ 1
- 9
Marlin/src/HAL/HAL_TEENSY35_36/watchdog_Teensy.h Ver arquivo

@@ -19,13 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
-
23
-#ifndef WATCHDOG_TEENSY_H
24
-#define WATCHDOG_TEENSY_H
25
-
26
-#include "HAL.h"
27
-
28
-// Arduino Due core now has watchdog support
22
+#pragma once
29 23
 
30 24
 void watchdog_init();
31 25
 
@@ -34,5 +28,3 @@ inline void watchdog_reset() {
34 28
   WDOG_REFRESH = 0xA602;
35 29
   WDOG_REFRESH = 0xB480;
36 30
 }
37
-
38
-#endif // WATCHDOG_TEENSY_H

+ 22
- 8
Marlin/src/HAL/platforms.h Ver arquivo

@@ -1,7 +1,25 @@
1
-#ifndef _HAL_PLATFORMS_H_
2
-#define _HAL_PLATFORMS_H_
3
-
4
-#ifndef HAL_PLATFORM
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+#pragma once
5 23
 
6 24
 #ifdef __AVR__
7 25
   #define HAL_PLATFORM HAL_AVR
@@ -27,10 +45,6 @@
27 45
   #error "Unsupported Platform!"
28 46
 #endif
29 47
 
30
-#endif // HAL_PLATFORM
31
-
32 48
 #define XSTR_(M) #M
33 49
 #define XSTR(M) XSTR_(M)
34 50
 #define HAL_PATH(PATH, NAME) XSTR(PATH/HAL_PLATFORM/NAME)
35
-
36
-#endif // _HAL_PLATFORMS_H_

+ 1
- 5
Marlin/src/HAL/shared/HAL_SPI.h Ver arquivo

@@ -19,15 +19,13 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
+#pragma once
22 23
 
23 24
 /**
24 25
  * HAL/HAL_SPI.h
25 26
  * Core Marlin definitions for SPI, implemented in the HALs
26 27
  */
27 28
 
28
-#ifndef _HAL_SPI_H_
29
-#define _HAL_SPI_H_
30
-
31 29
 #include <stdint.h>
32 30
 
33 31
 /**
@@ -78,5 +76,3 @@ void spiRead(uint8_t* buf, uint16_t nbyte);
78 76
 void spiSendBlock(uint8_t token, const uint8_t* buf);
79 77
 /** Begin SPI transaction, set clock, bit order, data mode */
80 78
 void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode);
81
-
82
-#endif // _HAL_SPI_H_

+ 1
- 5
Marlin/src/HAL/shared/backtrace/backtrace.h Ver arquivo

@@ -19,11 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
-
23
-#ifndef _BACKTRACE_H_
24
-#define _BACKTRACE_H_
22
+#pragma once
25 23
 
26 24
 // Perform a backtrace to the serial port
27 25
 void backtrace(void);
28
-
29
-#endif

+ 1
- 4
Marlin/src/HAL/shared/backtrace/unwarm.h Ver arquivo

@@ -11,8 +11,7 @@
11 11
  * File Description: Internal interface between the ARM unwinding sub-modules.
12 12
  **************************************************************************/
13 13
 
14
-#ifndef UNWARM_H
15
-#define UNWARM_H
14
+#pragma once
16 15
 
17 16
 #include "unwinder.h"
18 17
 
@@ -139,5 +138,3 @@ bool UnwReportRetAddr(UnwState * const state, uint32_t addr);
139 138
 bool UnwMemWriteRegister(UnwState * const state, const uint32_t addr, const RegData * const reg);
140 139
 bool UnwMemReadRegister(UnwState * const state, const uint32_t addr, RegData * const reg);
141 140
 void UnwMemHashGC(UnwState * const state);
142
-
143
-#endif // UNWARM_H

+ 1
- 4
Marlin/src/HAL/shared/backtrace/unwarmbytab.h Ver arquivo

@@ -12,8 +12,7 @@
12 12
  * File Description: Interface to the memory tracking sub-system.
13 13
  **************************************************************************/
14 14
 
15
-#ifndef UNWARMBYTAB_H
16
-#define UNWARMBYTAB_H
15
+#pragma once
17 16
 
18 17
 #include "unwarm.h"
19 18
 
@@ -30,5 +29,3 @@ typedef struct {
30 29
 } UnwTabEntry;
31 30
 
32 31
 UnwResult UnwindByTableStart(UnwindFrame* frame, const UnwindCallbacks *cb, void *data);
33
-
34
-#endif // UNWARMBYTAB_H

+ 1
- 5
Marlin/src/HAL/shared/backtrace/unwarmmem.h Ver arquivo

@@ -12,14 +12,10 @@
12 12
  * File Description: Interface to the memory tracking sub-system.
13 13
  **************************************************************************/
14 14
 
15
-#ifndef UNWARMMEM_H
16
-#define UNWARMMEM_H
15
+#pragma once
17 16
 
18 17
 #include "unwarm.h"
19 18
 
20 19
 bool UnwMemHashRead(MemData * const memData, uint32_t addr, uint32_t * const data, bool * const tracked);
21 20
 bool UnwMemHashWrite(MemData * const memData, uint32_t addr, uint32_t val, bool valValid);
22 21
 void UnwMemHashGC(UnwState * const state);
23
-
24
-#endif
25
-

+ 1
- 4
Marlin/src/HAL/shared/backtrace/unwinder.h Ver arquivo

@@ -13,8 +13,7 @@
13 13
  * Interface to the ARM stack unwinding module.
14 14
  **************************************************************************/
15 15
 
16
-#ifndef UNWINDER_H
17
-#define UNWINDER_H
16
+#pragma once
18 17
 
19 18
 #include <stdint.h>
20 19
 
@@ -171,5 +170,3 @@ typedef struct {
171 170
  * get function names in the traceback. Otherwise, you will not.
172 171
  */
173 172
 UnwResult UnwindStart(UnwindFrame* frame, const UnwindCallbacks *cb, void *data);
174
-
175
-#endif /* UNWINDER_H */

+ 1
- 5
Marlin/src/HAL/shared/backtrace/unwmemaccess.h Ver arquivo

@@ -12,8 +12,7 @@
12 12
  * File Description: Utility functions to access memory
13 13
  **************************************************************************/
14 14
 
15
-#ifndef UNWMEMACCESS_H
16
-#define UNWMEMACCESS_H
15
+#pragma once
17 16
 
18 17
 #include "unwarm.h"
19 18
 #include <stdint.h>
@@ -21,6 +20,3 @@
21 20
 bool UnwReadW(const uint32_t a, uint32_t *v);
22 21
 bool UnwReadH(const uint32_t a, uint16_t *v);
23 22
 bool UnwReadB(const uint32_t a, uint8_t *v);
24
-
25
-#endif
26
-

+ 1
- 5
Marlin/src/HAL/shared/math_32bit.h Ver arquivo

@@ -19,9 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
-
23
-#ifndef MATH_32BIT_H
24
-#define MATH_32BIT_H
22
+#pragma once
25 23
 
26 24
 #include "../../core/macros.h"
27 25
 
@@ -31,5 +29,3 @@
31 29
 static FORCE_INLINE uint32_t MultiU32X24toH32(uint32_t longIn1, uint32_t longIn2) {
32 30
   return ((uint64_t)longIn1 * longIn2 + 0x00800000) >> 24;
33 31
 }
34
-
35
-#endif // MATH_32BIT_H

+ 1
- 5
Marlin/src/HAL/shared/servo_private.h Ver arquivo

@@ -19,6 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
+#pragma once
22 23
 
23 24
 /**
24 25
  * servo_private.h - Interrupt driven Servo library for Arduino using 16 bit timers- Version 2
@@ -39,9 +40,6 @@
39 40
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
40 41
  */
41 42
 
42
-#ifndef SERVO_PRIVATE_H
43
-#define SERVO_PRIVATE_H
44
-
45 43
 #include <stdint.h>
46 44
 
47 45
 // Architecture specific include
@@ -98,5 +96,3 @@ extern ServoInfo_t servo_info[MAX_SERVOS];
98 96
 
99 97
 extern void initISR(timer16_Sequence_t timer);
100 98
 extern void finISR(timer16_Sequence_t timer);
101
-
102
-#endif // SERVO_PRIVATE_H

+ 1
- 4
Marlin/src/Marlin.h Ver arquivo

@@ -19,8 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
-#ifndef __MARLIN_H__
23
-#define __MARLIN_H__
22
+#pragma once
24 23
 
25 24
 #include "inc/MarlinConfig.h"
26 25
 
@@ -242,5 +241,3 @@ void protected_pin_err();
242 241
 #if HAS_SUICIDE
243 242
   inline void suicide() { OUT_WRITE(SUICIDE_PIN, LOW); }
244 243
 #endif
245
-
246
-#endif // __MARLIN_H__

+ 1
- 5
Marlin/src/core/boards.h Ver arquivo

@@ -19,9 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
-
23
-#ifndef BOARDS_H
24
-#define BOARDS_H
22
+#pragma once
25 23
 
26 24
 #define BOARD_UNKNOWN -1
27 25
 
@@ -247,5 +245,3 @@
247 245
 #define BOARD_ESP32            1900
248 246
 
249 247
 #define MB(board) (defined(BOARD_##board) && MOTHERBOARD==BOARD_##board)
250
-
251
-#endif // __BOARDS_H

+ 1
- 5
Marlin/src/core/enum.h Ver arquivo

@@ -19,9 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
-
23
-#ifndef __ENUM_H__
24
-#define __ENUM_H__
22
+#pragma once
25 23
 
26 24
 /**
27 25
  * Axis indices as enumerated constants
@@ -68,5 +66,3 @@ typedef enum {
68 66
   TEMPUNIT_K,
69 67
   TEMPUNIT_F
70 68
 } TempUnit;
71
-
72
-#endif // __ENUM_H__

+ 1
- 5
Marlin/src/core/serial.h Ver arquivo

@@ -19,9 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
-
23
-#ifndef __SERIAL_H__
24
-#define __SERIAL_H__
22
+#pragma once
25 23
 
26 24
 #include "../inc/MarlinConfigPre.h"
27 25
 #include HAL_PATH(../HAL, HAL.h)
@@ -246,5 +244,3 @@ void serial_error_start();
246 244
   void print_xyz(PGM_P prefix, PGM_P suffix, const float xyz[]);
247 245
   #define DEBUG_POS(SUFFIX,VAR) do { print_xyz(PSTR("  " STRINGIFY(VAR) "="), PSTR(" : " SUFFIX "\n"), VAR); } while(0)
248 246
 #endif
249
-
250
-#endif // __SERIAL_H__

+ 1
- 5
Marlin/src/core/utility.h Ver arquivo

@@ -19,9 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
-
23
-#ifndef __UTILITY_H__
24
-#define __UTILITY_H__
22
+#pragma once
25 23
 
26 24
 #include "../inc/MarlinConfigPre.h"
27 25
 
@@ -102,5 +100,3 @@ void safe_delay(millis_t ms);
102 100
 #if ENABLED(DEBUG_LEVELING_FEATURE)
103 101
   void log_machine_info();
104 102
 #endif
105
-
106
-#endif // __UTILITY_H__

+ 1
- 5
Marlin/src/feature/I2CPositionEncoder.h Ver arquivo

@@ -19,9 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
-
23
-#ifndef I2CPOSENC_H
24
-#define I2CPOSENC_H
22
+#pragma once
25 23
 
26 24
 #include "../inc/MarlinConfig.h"
27 25
 
@@ -331,5 +329,3 @@ class I2CPositionEncodersMgr {
331 329
 };
332 330
 
333 331
 extern I2CPositionEncodersMgr I2CPEM;
334
-
335
-#endif //I2CPOSENC_H

+ 1
- 5
Marlin/src/feature/baricuda.h Ver arquivo

@@ -19,11 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
-
23
-#ifndef __BARICUDA_H__
24
-#define __BARICUDA_H__
22
+#pragma once
25 23
 
26 24
 extern uint8_t baricuda_valve_pressure,
27 25
                baricuda_e_to_p_pressure;
28
-
29
-#endif // __BARICUDA_H__

+ 1
- 5
Marlin/src/feature/bedlevel/abl/abl.h Ver arquivo

@@ -19,9 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
-
23
-#ifndef __ABL_H__
24
-#define __ABL_H__
22
+#pragma once
25 23
 
26 24
 #include "../../../inc/MarlinConfig.h"
27 25
 
@@ -47,5 +45,3 @@
47 45
   #endif
48 46
 
49 47
 #endif // AUTO_BED_LEVELING_BILINEAR
50
-
51
-#endif // __ABL_H__

+ 1
- 5
Marlin/src/feature/bedlevel/bedlevel.h Ver arquivo

@@ -19,9 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
-
23
-#ifndef __BEDLEVEL_H__
24
-#define __BEDLEVEL_H__
22
+#pragma once
25 23
 
26 24
 #include "../../inc/MarlinConfigPre.h"
27 25
 
@@ -85,5 +83,3 @@ void reset_bed_level();
85 83
 #elif HAS_ABL
86 84
   #include "abl/abl.h"
87 85
 #endif
88
-
89
-#endif // __BEDLEVEL_H__

+ 1
- 5
Marlin/src/feature/bedlevel/mbl/mesh_bed_leveling.h Ver arquivo

@@ -19,9 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
-
23
-#ifndef _MESH_BED_LEVELING_H_
24
-#define _MESH_BED_LEVELING_H_
22
+#pragma once
25 23
 
26 24
 #include "../../../inc/MarlinConfig.h"
27 25
 
@@ -120,5 +118,3 @@ public:
120 118
 };
121 119
 
122 120
 extern mesh_bed_leveling mbl;
123
-
124
-#endif // _MESH_BED_LEVELING_H_

+ 1
- 5
Marlin/src/feature/bedlevel/ubl/ubl.h Ver arquivo

@@ -19,9 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
-
23
-#ifndef UNIFIED_BED_LEVELING_H
24
-#define UNIFIED_BED_LEVELING_H
22
+#pragma once
25 23
 
26 24
 //#define UBL_DEVEL_DEBUGGING
27 25
 
@@ -372,5 +370,3 @@ class unified_bed_leveling {
372 370
 }; // class unified_bed_leveling
373 371
 
374 372
 extern unified_bed_leveling ubl;
375
-
376
-#endif // UNIFIED_BED_LEVELING_H

+ 1
- 5
Marlin/src/feature/caselight.h Ver arquivo

@@ -19,9 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
-
23
-#ifndef __CASELIGHT_H__
24
-#define __CASELIGHT_H__
22
+#pragma once
25 23
 
26 24
 extern uint8_t case_light_brightness;
27 25
 extern bool case_light_on;
@@ -29,5 +27,3 @@ extern uint8_t case_light_brightness_sav;   // saves brighness info when case_li
29 27
 extern bool case_light_arg_flag;  // flag to notify if S or P argument type
30 28
 
31 29
 void update_case_light();
32
-
33
-#endif // __CASELIGHT_H__

+ 1
- 5
Marlin/src/feature/controllerfan.h Ver arquivo

@@ -19,10 +19,6 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
-
23
-#ifndef __CONTROLLERFAN_H__
24
-#define __CONTROLLERFAN_H__
22
+#pragma once
25 23
 
26 24
 void controllerfan_update();
27
-
28
-#endif // __CONTROLLERFAN_H__

+ 22
- 4
Marlin/src/feature/dac/dac_dac084s085.h Ver arquivo

@@ -1,5 +1,25 @@
1
-#ifndef DAC084S085_H
2
-#define DAC084S085_H
1
+/**
2
+ * Marlin 3D Printer Firmware
3
+ * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
+ *
5
+ * Based on Sprinter and grbl.
6
+ * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
+ *
21
+ */
22
+#pragma once
3 23
 
4 24
 class dac084s085 {
5 25
   public:
@@ -9,5 +29,3 @@ class dac084s085 {
9 29
   private:
10 30
     static void cshigh();
11 31
 };
12
-
13
-#endif // DAC084S085_H

+ 1
- 5
Marlin/src/feature/dac/dac_mcp4728.h Ver arquivo

@@ -19,14 +19,12 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
+#pragma once
22 23
 
23 24
 /**
24 25
  * Arduino library for MicroChip MCP4728 I2C D/A converter.
25 26
  */
26 27
 
27
-#ifndef DAC_MCP4728_H
28
-#define DAC_MCP4728_H
29
-
30 28
 #include <Wire.h>
31 29
 
32 30
 #define defaultVDD     DAC_STEPPER_MAX //was 5000 but differs with internal Vref
@@ -57,5 +55,3 @@ uint8_t mcp4728_fastWrite();
57 55
 uint8_t mcp4728_simpleCommand(byte simpleCommand);
58 56
 uint8_t mcp4728_getDrvPct(uint8_t channel);
59 57
 void mcp4728_setDrvPct(uint8_t pct[XYZE]);
60
-
61
-#endif // DAC_MCP4728_H

+ 1
- 22
Marlin/src/feature/dac/stepper_dac.h Ver arquivo

@@ -19,31 +19,12 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
+#pragma once
22 23
 
23 24
 /**
24 25
  * stepper_dac.h   - To set stepper current via DAC
25
- *
26
- * Part of Marlin
27
- *
28
- * Copyright (c) 2016 MarlinFirmware
29
- *
30
- * Marlin is free software: you can redistribute it and/or modify
31
- * it under the terms of the GNU General Public License as published by
32
- * the Free Software Foundation, either version 3 of the License, or
33
- * (at your option) any later version.
34
- *
35
- * Marlin is distributed in the hope that it will be useful,
36
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
37
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
38
- * GNU General Public License for more details.
39
- *
40
- * You should have received a copy of the GNU General Public License
41
- * along with Marlin.  If not, see <http://www.gnu.org/licenses/>.
42 26
  */
43 27
 
44
-#ifndef STEPPER_DAC_H
45
-#define STEPPER_DAC_H
46
-
47 28
 #include "dac_mcp4728.h"
48 29
 
49 30
 int dac_init();
@@ -53,5 +34,3 @@ void dac_print_values();
53 34
 void dac_commit_eeprom();
54 35
 uint8_t dac_current_get_percent(AxisEnum axis);
55 36
 void dac_current_set_percents(const uint8_t pct[XYZE]);
56
-
57
-#endif // STEPPER_DAC_H

+ 1
- 5
Marlin/src/feature/digipot/digipot.h Ver arquivo

@@ -19,11 +19,7 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
-
23
-#ifndef __DIGIPOT_H__
24
-#define __DIGIPOT_H__
22
+#pragma once
25 23
 
26 24
 void digipot_i2c_set_current(const uint8_t channel, const float current);
27 25
 void digipot_i2c_init();
28
-
29
-#endif // __DIGIPOT_H__

+ 1
- 5
Marlin/src/feature/fanmux.h Ver arquivo

@@ -19,15 +19,11 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
+#pragma once
22 23
 
23 24
 /**
24 25
  * feature/fanmux.h - Cooling Fan Multiplexer support functions
25 26
  */
26 27
 
27
-#ifndef _FANMUX_H_
28
-#define _FANMUX_H_
29
-
30 28
 extern void fanmux_switch(const uint8_t e);
31 29
 extern void fanmux_init(void);
32
-
33
-#endif // _FANMUX_H_

+ 0
- 0
Marlin/src/feature/filwidth.h Ver arquivo


Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff

Carregando…
Cancelar
Salvar