blob: dbf6ce9b74ada7a49df575b048e4deb3200b1094 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
/* Exception handlers for STM32 (by Lanchon) */
#ifndef __STM32EXCEPTIONS_H
#define __STM32EXCEPTIONS_H
#if __cplusplus
extern "C"
{
#endif
/* Use a shared infinite loop for unexpected exceptions. */
/* #define SHARED_EXCEPTION_HANDLER */
/* Or use an external handler for unexpected exceptions. */
/* #define CUSTOM_EXCEPTION_HANDLER */
/* Or else use individual infinite loops when debugging,
* or a shared infinite loop when not. */
#ifdef CUSTOM_EXCEPTION_HANDLER
void unexpected_exception(const char* name, int address);
#define DEFAULT_EXCEPTION_HANDLER(handler, name, number, address) unexpected_exception(name, address);
#endif
|