Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
blinker.h
Go to the documentation of this file.
1
35#ifndef _UTILS_BLINKER_H_
36#define _UTILS_BLINKER_H_
37
38#include <stdint.h>
39
40#ifdef __cplusplus
41extern "C" {
42#endif
43
45#define BLINK_DIE_UNEXPIRQ 0x800002CA // 3-1-1
47#define BLINK_DIE_HARDFAULT 0x80000ACA // 3-1-2
49#define BLINK_DIE_NMI 0x8002A0CA /* 3-1-3 */
51#define BLINK_DIE_SVC 0x800AA0CA /* 3-1-4 */
53#define BLINK_DIE_PENDSV 0x802AA0CA /* 3-1-5 */
55#define BLINK_DIE_TICK 0x80AAA0CA /* 3-1-6 */
56
58#define BLINK_DIE_OUTOFMEM 0x80008CCA // 3-2-1
60#define BLINK_DIE_ASSERT 0x80028CCA // 3-2-2
62#define BLINK_DIE_STACKOVERFLOW 0x800A8CCA // 3-2-3
65#define BLINK_DIE_OUTOFMEMSTACK 0x802A8CCA // 3-2-4
67#define BLINK_DIE_STACKCOLLIDE 0x80AA8CCA // 3-2-5
68
71#define BLINK_DIE_ABORT 0x8000CCCA // 3-3
73#define BLINK_DIE_WATCHDOG 0x8002CCCA // 3-3-1
75#define BLINK_DIE_STARTUP 0x800ACCCA // 3-3-2
76
80extern void setblink(uint32_t pattern);
81
85extern void resetblink(uint32_t pattern);
86
88extern uint32_t blinker_pattern;
89
91extern void diewith(uint32_t);
92
99extern unsigned parseblink(uint32_t pattern);
100
101#ifdef __cplusplus
102}
103#endif // cplusplus
104
105#endif // _UTILS_BLINKER_H_
uint32_t blinker_pattern
The currently active blinking pattern.
void resetblink(uint32_t pattern)
Changes the blinking pattern.
void diewith(uint32_t)
Sets a blinking pattern and never returns.
void setblink(uint32_t pattern)
Initializes the blinker routine with a specific blinking pattern.
unsigned parseblink(uint32_t pattern)
Turns a blinker pattern into an error code in BCD.
Definition Blinker.cxx:40