diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index ded8b1f50e..1e14fbf1c4 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -35,13 +35,11 @@ #include "MarlinConfig.h" -#include "fastio.h" - #include "enum.h" +#include "types.h" +#include "fastio.h" #include "utility.h" -typedef unsigned long millis_t; - #ifdef USBCON #include "HardwareSerial.h" #if ENABLED(BLUETOOTH) diff --git a/Marlin/utility.cpp b/Marlin/utility.cpp index 385fe3d391..0285219c40 100644 --- a/Marlin/utility.cpp +++ b/Marlin/utility.cpp @@ -21,9 +21,10 @@ */ #include "Marlin.h" +#include "utility.h" #include "temperature.h" -void safe_delay(uint16_t ms) { +void safe_delay(millis_t ms) { while (ms > 50) { ms -= 50; delay(50); diff --git a/Marlin/utility.h b/Marlin/utility.h index 8bb3a9b8b6..8ca70dbf83 100644 --- a/Marlin/utility.h +++ b/Marlin/utility.h @@ -20,4 +20,9 @@ * */ -void safe_delay(uint16_t ms); +#ifndef __UTILITY_H__ +#define __UTILITY_H__ + +void safe_delay(millis_t ms); + +#endif