Browse Source

Fix warning in gcode_D

vanilla_fb_2.0.x
Scott Lahteine 4 years ago
parent
commit
5917b5cf5c
  1. 2
      Marlin/src/HAL/LINUX/HAL.h
  2. 4
      Marlin/src/HAL/shared/Delay.h
  3. 2
      Marlin/src/gcode/gcode_d.cpp

2
Marlin/src/HAL/LINUX/HAL.h

@ -23,7 +23,7 @@
#define CPU_32_BIT
#define F_CPU 100000000
#define F_CPU 100000000UL
#define SystemCoreClock F_CPU
#include <iostream>
#include <stdint.h>

4
Marlin/src/HAL/shared/Delay.h

@ -155,7 +155,7 @@
#endif
// Delay in nanoseconds
#define DELAY_NS(x) DELAY_CYCLES( (x) * (F_CPU / 1000000UL) / 1000UL )
#define DELAY_NS(x) DELAY_CYCLES((x) * ((F_CPU) / 1000000UL) / 1000UL)
// Delay in microseconds
#define DELAY_US(x) DELAY_CYCLES( (x) * (F_CPU / 1000000UL) )
#define DELAY_US(x) DELAY_CYCLES((x) * ((F_CPU) / 1000000UL))

2
Marlin/src/gcode/gcode_d.cpp

@ -181,7 +181,7 @@
// Use a low-level delay that does not rely on interrupts to function
// Do not spin forever, to avoid thermal risks if heaters are enabled and
// watchdog does not work.
DELAY_US(10000000);
for (int i = 10000; i--;) DELAY_US(1000UL);
ENABLE_ISRS();
SERIAL_ECHOLNPGM("FAILURE: Watchdog did not trigger board reset.");
}

Loading…
Cancel
Save