|
LSH-Core
A robust C++ framework for Arduino-based home automation nodes
|
Provides a utility function for performing a hardware reset via watchdog. More...
#include <avr/wdt.h>

Go to the source code of this file.
Functions | |
| __attribute__ ((noinline)) inline void deviceReset() | |
| Performs a hardware reset using the watchdog timer. | |
Provides a utility function for performing a hardware reset via watchdog.
Copyright 2025 Jacopo Labardi
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
| __attribute__ | ( | (noinline) | ) |
Performs a hardware reset using the watchdog timer.
It's marked 'inline' to satisfy the One Definition Rule, allowing it to be defined in a header included by multiple source files without linker errors.
It's also marked 'noinline' to explicitly tell the compiler not to expand this function at the call site, which prevents warnings and aligns with the optimizer's decision, as this call is unlikely.