distortos  v0.6.0
object-oriented C++ RTOS for microcontrollers
BIND_LOW_LEVEL_INITIALIZER_IMPLEMENTATION.h
Go to the documentation of this file.
1 
12 #ifndef INCLUDE_DISTORTOS_INTERNAL_BIND_LOW_LEVEL_INITIALIZER_IMPLEMENTATION_H_
13 #define INCLUDE_DISTORTOS_INTERNAL_BIND_LOW_LEVEL_INITIALIZER_IMPLEMENTATION_H_
14 
15 #include "distortos/CONCATENATE.h"
16 
17 /*---------------------------------------------------------------------------------------------------------------------+
18 | global types
19 +---------------------------------------------------------------------------------------------------------------------*/
20 
22 typedef void (LowLevelInitializer)(void);
23 
24 /*---------------------------------------------------------------------------------------------------------------------+
25 | global defines
26 +---------------------------------------------------------------------------------------------------------------------*/
27 
28 #define ORDER_STRING_0 "00"
29 #define ORDER_STRING_1 "01"
30 #define ORDER_STRING_2 "02"
31 #define ORDER_STRING_3 "03"
32 #define ORDER_STRING_4 "04"
33 #define ORDER_STRING_5 "05"
34 #define ORDER_STRING_6 "06"
35 #define ORDER_STRING_7 "07"
36 #define ORDER_STRING_8 "08"
37 #define ORDER_STRING_9 "09"
38 
39 #define ORDER_STRING_10 "10"
40 #define ORDER_STRING_11 "11"
41 #define ORDER_STRING_12 "12"
42 #define ORDER_STRING_13 "13"
43 #define ORDER_STRING_14 "14"
44 #define ORDER_STRING_15 "15"
45 #define ORDER_STRING_16 "16"
46 #define ORDER_STRING_17 "17"
47 #define ORDER_STRING_18 "18"
48 #define ORDER_STRING_19 "19"
49 
50 #define ORDER_STRING_20 "20"
51 #define ORDER_STRING_21 "21"
52 #define ORDER_STRING_22 "22"
53 #define ORDER_STRING_23 "23"
54 #define ORDER_STRING_24 "24"
55 #define ORDER_STRING_25 "25"
56 #define ORDER_STRING_26 "26"
57 #define ORDER_STRING_27 "27"
58 #define ORDER_STRING_28 "28"
59 #define ORDER_STRING_29 "29"
60 
61 #define ORDER_STRING_30 "30"
62 #define ORDER_STRING_31 "31"
63 #define ORDER_STRING_32 "32"
64 #define ORDER_STRING_33 "33"
65 #define ORDER_STRING_34 "34"
66 #define ORDER_STRING_35 "35"
67 #define ORDER_STRING_36 "36"
68 #define ORDER_STRING_37 "37"
69 #define ORDER_STRING_38 "38"
70 #define ORDER_STRING_39 "39"
71 
72 #define ORDER_STRING_40 "40"
73 #define ORDER_STRING_41 "41"
74 #define ORDER_STRING_42 "42"
75 #define ORDER_STRING_43 "43"
76 #define ORDER_STRING_44 "44"
77 #define ORDER_STRING_45 "45"
78 #define ORDER_STRING_46 "46"
79 #define ORDER_STRING_47 "47"
80 #define ORDER_STRING_48 "48"
81 #define ORDER_STRING_49 "49"
82 
83 #define ORDER_STRING_50 "50"
84 #define ORDER_STRING_51 "51"
85 #define ORDER_STRING_52 "52"
86 #define ORDER_STRING_53 "53"
87 #define ORDER_STRING_54 "54"
88 #define ORDER_STRING_55 "55"
89 #define ORDER_STRING_56 "56"
90 #define ORDER_STRING_57 "57"
91 #define ORDER_STRING_58 "58"
92 #define ORDER_STRING_59 "59"
93 
94 #define ORDER_STRING_60 "60"
95 #define ORDER_STRING_61 "61"
96 #define ORDER_STRING_62 "62"
97 #define ORDER_STRING_63 "63"
98 #define ORDER_STRING_64 "64"
99 #define ORDER_STRING_65 "65"
100 #define ORDER_STRING_66 "66"
101 #define ORDER_STRING_67 "67"
102 #define ORDER_STRING_68 "68"
103 #define ORDER_STRING_69 "69"
104 
105 #define ORDER_STRING_70 "70"
106 #define ORDER_STRING_71 "71"
107 #define ORDER_STRING_72 "72"
108 #define ORDER_STRING_73 "73"
109 #define ORDER_STRING_74 "74"
110 #define ORDER_STRING_75 "75"
111 #define ORDER_STRING_76 "76"
112 #define ORDER_STRING_77 "77"
113 #define ORDER_STRING_78 "78"
114 #define ORDER_STRING_79 "79"
115 
116 #define ORDER_STRING_80 "80"
117 #define ORDER_STRING_81 "81"
118 #define ORDER_STRING_82 "82"
119 #define ORDER_STRING_83 "83"
120 #define ORDER_STRING_84 "84"
121 #define ORDER_STRING_85 "85"
122 #define ORDER_STRING_86 "86"
123 #define ORDER_STRING_87 "87"
124 #define ORDER_STRING_88 "88"
125 #define ORDER_STRING_89 "89"
126 
127 #define ORDER_STRING_90 "90"
128 #define ORDER_STRING_91 "91"
129 #define ORDER_STRING_92 "92"
130 #define ORDER_STRING_93 "93"
131 #define ORDER_STRING_94 "94"
132 #define ORDER_STRING_95 "95"
133 #define ORDER_STRING_96 "96"
134 #define ORDER_STRING_97 "97"
135 #define ORDER_STRING_98 "98"
136 #define ORDER_STRING_99 "99"
137 
144 #define ORDER_STRING(order) CONCATENATE2(ORDER_STRING_, order)
145 
154 #define BIND_LOW_LEVEL_INITIALIZER_IMPLEMENTATION(order, function, sectionPrefix) \
155  __attribute__ ((section(sectionPrefix ORDER_STRING(order)), used)) \
156  static LowLevelInitializer* const CONCATENATE2(lowLevelInitializerPointer, __COUNTER__) = function
157 
158 #endif /* INCLUDE_DISTORTOS_INTERNAL_BIND_LOW_LEVEL_INITIALIZER_IMPLEMENTATION_H_ */
CONCATENATE() macros.
void() LowLevelInitializer(void)
low-level initializer function
Definition: BIND_LOW_LEVEL_INITIALIZER_IMPLEMENTATION.h:22