7
7
#include < interrupt/impl.hpp>
8
8
#include < interrupt/policies.hpp>
9
9
10
+ #include < stdx/ct_format.hpp>
10
11
#include < stdx/tuple.hpp>
11
12
#include < stdx/tuple_algorithms.hpp>
13
+ #include < stdx/utility.hpp>
12
14
13
15
namespace interrupt {
14
16
namespace detail {
@@ -96,6 +98,13 @@ struct irq : detail::policy_config<Policies>,
96
98
detail::super_config<Number, Priority>,
97
99
detail::flow_config<Flows...> {
98
100
template <typename ... Nexi> using built_t = irq_impl<irq, Nexi...>;
101
+
102
+ constexpr static auto config () {
103
+ using namespace stdx ::literals;
104
+ return +stdx::ct_format<" interrupt::irq<{}_irq, {}, {}>" >(
105
+ stdx::ct<stdx::to_underlying (Number)>(), stdx::ct<Priority>(),
106
+ detail::config_string_for<Policies, Flows...>());
107
+ }
99
108
};
100
109
101
110
template <typename EnableField, typename StatusField, typename Policies,
@@ -105,6 +114,13 @@ struct sub_irq : detail::policy_config<Policies>,
105
114
detail::sub_config<EnableField, StatusField>,
106
115
detail::flow_config<Flows...> {
107
116
template <typename ... Nexi> using built_t = sub_irq_impl<sub_irq, Nexi...>;
117
+
118
+ constexpr static auto config () {
119
+ using namespace stdx ::literals;
120
+ return +stdx::ct_format<" interrupt::sub_irq<{}>" >(
121
+ detail::config_string_for<EnableField, StatusField, Policies,
122
+ Flows...>());
123
+ }
108
124
};
109
125
110
126
template <typename EnableField, typename Policies>
@@ -113,6 +129,12 @@ struct id_irq : detail::policy_config<Policies>,
113
129
detail::sub_config<EnableField, status_t <>> {
114
130
template <typename ...> using built_t = id_irq_impl<id_irq>;
115
131
template <typename > constexpr static bool triggers_flow = false ;
132
+
133
+ constexpr static auto config () {
134
+ using namespace stdx ::literals;
135
+ return +stdx::ct_format<" interrupt::id_irq<{}>" >(
136
+ detail::config_string_for<EnableField, Policies>());
137
+ }
116
138
};
117
139
118
140
template <irq_num_t Number, priority_t Priority, typename Policies,
@@ -131,6 +153,13 @@ struct shared_irq : detail::policy_config<Policies>,
131
153
template <typename Flow>
132
154
constexpr static bool triggers_flow =
133
155
(... or Cfgs::template triggers_flow<Flow>);
156
+
157
+ constexpr static auto config () {
158
+ using namespace stdx ::literals;
159
+ return +stdx::ct_format<" interrupt::shared_irq<{}_irq, {}, {}>" >(
160
+ stdx::ct<stdx::to_underlying (Number)>(), stdx::ct<Priority>(),
161
+ detail::config_string_for<Policies, Cfgs...>());
162
+ }
134
163
};
135
164
136
165
template <typename EnableField, typename StatusField, typename Policies,
@@ -149,5 +178,12 @@ struct shared_sub_irq : detail::policy_config<Policies>,
149
178
template <typename Flow>
150
179
constexpr static bool triggers_flow =
151
180
(... or Cfgs::template triggers_flow<Flow>);
181
+
182
+ constexpr static auto config () {
183
+ using namespace stdx ::literals;
184
+ return +stdx::ct_format<" interrupt::shared_sub_irq<{}>" >(
185
+ detail::config_string_for<EnableField, StatusField, Policies,
186
+ Cfgs...>());
187
+ }
152
188
};
153
189
} // namespace interrupt
0 commit comments