LSH-Core
A robust C++ framework for Arduino-based home automation nodes
Loading...
Searching...
No Matches
reset.hpp
Go to the documentation of this file.
1
21
#ifndef LSHCORE_UTIL_RESET_HPP
22
#define LSHCORE_UTIL_RESET_HPP
23
24
#include <avr/wdt.h>
25
36
[[noreturn]]
__attribute__
((noinline))
inline
void
deviceReset()
37
{
38
cli();
39
wdt_enable(WDTO_15MS);
40
while
(
true
)
41
{
42
// Wait for the watchdog to bite.
43
}
44
}
45
46
#endif
// LSHCORE_UTILS_RESET_HPP
__attribute__
__attribute__((noinline)) inline void deviceReset()
Performs a hardware reset using the watchdog timer.
Definition
reset.hpp:36
src
util
reset.hpp
Generated by
1.9.8