Skip to content

Commit 8fb3919

Browse files
committed
⚡ Flatten injected interrupt HAL functions
1 parent f4a6e60 commit 8fb3919

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

include/interrupt/hal.hpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include <interrupt/fwd.hpp>
44
#include <interrupt/policies.hpp>
55

6+
#include <stdx/compiler.hpp>
67
#include <stdx/concepts.hpp>
78
#include <stdx/type_traits.hpp>
89

@@ -44,19 +45,20 @@ template <typename...> inline auto injected_hal = null_hal{};
4445
struct hal {
4546
template <typename... Ts>
4647
requires(sizeof...(Ts) == 0)
47-
static auto init() -> void {
48+
ALWAYS_INLINE static auto init() -> void {
4849
injected_hal<Ts...>.init();
4950
}
5051

5152
template <bool Enable, irq_num_t IrqNumber, int Priority, typename... Ts>
5253
requires(sizeof...(Ts) == 0)
53-
static auto irq_init() -> void {
54+
ALWAYS_INLINE static auto irq_init() -> void {
5455
injected_hal<Ts...>.template irq_init<Enable, IrqNumber, Priority>();
5556
}
5657

5758
template <status_policy P, typename... Ts>
5859
requires(sizeof...(Ts) == 0)
59-
static auto run(irq_num_t irq, stdx::invocable auto const &isr) -> void {
60+
ALWAYS_INLINE static auto run(irq_num_t irq,
61+
stdx::invocable auto const &isr) -> void {
6062
injected_hal<Ts...>.template run<P>(irq, isr);
6163
}
6264
};

0 commit comments

Comments
 (0)