File tree 3 files changed +37
-8
lines changed
3 files changed +37
-8
lines changed Original file line number Diff line number Diff line change 20
20
21
21
#include "PeripheralPins.h"
22
22
23
- /**
24
- * Libc porting layers
25
- */
26
- #if defined ( __GNUC__ ) /* GCC CS3 */
27
- #include <syscalls.h> /** RedHat Newlib minimal stub */
28
- #define WEAK __attribute__ ((weak))
29
- #endif
30
-
31
23
// Arduino digital pin alias
32
24
// GPIO port (A to K) * 16 pins: 176
33
25
enum {
Original file line number Diff line number Diff line change
1
+ #include "stm32_def.h"
2
+
3
+ #ifdef __cplusplus
4
+ extern "C" {
5
+ #endif
6
+
7
+ /**
8
+ * @brief This function is executed in case of error occurrence.
9
+ * @param None
10
+ * @retval None
11
+ */
12
+ WEAK void _Error_Handler (const char * msg , int val )
13
+ {
14
+ /* User can add his own implementation to report the HAL error return state */
15
+ printf ("Error: %s (%i)\n" , msg , val );
16
+ while (1 )
17
+ {
18
+ }
19
+ }
20
+
21
+ #ifdef __cplusplus
22
+ }
23
+ #endif
Original file line number Diff line number Diff line change 74
74
#define CAN1 CAN
75
75
#endif
76
76
77
+ /**
78
+ * Libc porting layers
79
+ */
80
+ #if defined ( __GNUC__ ) /* GCC CS3 */
81
+ #include <syscalls.h> /** RedHat Newlib minimal stub */
82
+ #define WEAK __attribute__ ((weak))
83
+ #endif
84
+
77
85
#ifdef __cplusplus
78
86
extern "C" {
79
87
#endif // __cplusplus
88
+
80
89
// weaked functions declaration
81
90
void SystemClock_Config (void );
91
+
92
+ void _Error_Handler (const char * , int );
93
+
94
+ #define Error_Handler () _Error_Handler(__FILE__, __LINE__)
95
+
82
96
#ifdef __cplusplus
83
97
} // extern "C"
84
98
#endif // __cplusplus
You can’t perform that action at this time.
0 commit comments