Control Surface
main
MIDI Control Surface library for Arduino
Loading...
Searching...
No Matches
src
AH
Error
Exit.cpp
Go to the documentation of this file.
1
#ifdef ARDUINO
2
3
#include "
Error.hpp
"
4
5
BEGIN_AH_NAMESPACE
6
7
void
fatalErrorExit
() {
8
#if defined(LED_BUILTIN) || (defined(ESP32) && defined(BUILTIN_LED))
9
pinMode(
LED_BUILTIN
,
OUTPUT
);
10
while
(1) {
11
digitalWrite(
LED_BUILTIN
,
HIGH
);
12
delay
(50);
13
digitalWrite(
LED_BUILTIN
,
LOW
);
14
delay
(50);
15
digitalWrite(
LED_BUILTIN
,
HIGH
);
16
delay
(50);
17
digitalWrite(
LED_BUILTIN
,
LOW
);
18
delay
(850);
19
}
20
#else
21
#warning "LED_BUILTIN is not available, so it cannot blink when an error occurs"
22
noInterrupts
();
23
while
(1)
24
yield
();
25
#endif
26
}
27
28
END_AH_NAMESPACE
29
30
#endif
END_AH_NAMESPACE
#define END_AH_NAMESPACE
Definition
AH/Settings/NamespaceSettings.hpp:14
BEGIN_AH_NAMESPACE
#define BEGIN_AH_NAMESPACE
Definition
AH/Settings/NamespaceSettings.hpp:11
LOW
constexpr PinStatus_t LOW
Definition
Arduino-Hardware-Types.hpp:58
HIGH
constexpr PinStatus_t HIGH
Definition
Arduino-Hardware-Types.hpp:57
OUTPUT
constexpr PinMode_t OUTPUT
Definition
Arduino-Hardware-Types.hpp:60
Error.hpp
AH::SPIShiftRegisterOut
A class for serial-in/parallel-out shift registers, like the 74HC595 that are connected to the SPI bu...
Definition
SPIShiftRegisterOut.hpp:28
AH::fatalErrorExit
void fatalErrorExit() __attribute__((noreturn))
Function that executes and loops forever, blinking the built-in LED when a fatal error is encountered...
Definition
Exit.cpp:7
Generated by
1.10.0