Prusa MINI Firmware overview
safety_timer.h File Reference
#include "../HAL/HAL.h"
#include "../core/utility.h"

Go to the source code of this file.

Functions

void safety_timer_set_interval (millis_t ms)
 
bool safety_timer_is_expired ()
 
void safety_timer_reset ()
 

Function Documentation

◆ safety_timer_set_interval()

void safety_timer_set_interval ( millis_t  ms)

Marlin 3D Printer Firmware Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]

Based on Sprinter and grbl. Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. Set the interval after which the safety timer will expire and reset the timer. If set to zero (default), the safety timer is disabled.

6  {
9 }
Here is the call graph for this function:

◆ safety_timer_is_expired()

bool safety_timer_is_expired ( )

Whether the safety timer is expired.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ safety_timer_reset()

void safety_timer_reset ( )

Reset the internal counter of the safety timer.

15  {
16  last_reset = millis();
17 }
Here is the call graph for this function:
Here is the caller graph for this function:
safety_timer_reset
void safety_timer_reset()
Definition: safety_timer.cpp:15
millis
uint32_t millis(void)
Definition: wiring_time.c:29
ELAPSED
#define ELAPSED(NOW, SOON)
Definition: millis_t.h:29
safety_timer_interval
static millis_t safety_timer_interval
Definition: safety_timer.cpp:3
last_reset
static millis_t last_reset
Definition: safety_timer.cpp:4