Skip to content
Snippets Groups Projects
Commit 226e74a4 authored by João Brázio's avatar João Brázio
Browse files

Fixes safe_delay() to be fully compatible with delay()

parent 8e79e8cd
Branches
Tags
No related merge requests found
......@@ -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)
......
......@@ -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);
......
......@@ -20,4 +20,9 @@
*
*/
void safe_delay(uint16_t ms);
#ifndef __UTILITY_H__
#define __UTILITY_H__
void safe_delay(millis_t ms);
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment