diff --git a/hardware0.hpp b/hardware0.hpp index a171aab..848bbdc 100644 --- a/hardware0.hpp +++ b/hardware0.hpp @@ -59,22 +59,22 @@ constexpr int operator<<(const int &lhs, const ControlFlagsB0 &rhs) { return lhs constexpr int operator<<(const int &lhs, const ControlFlagsC0 &rhs) { return lhs << static_cast(rhs); } // clang-format on -static void (*fnDataReg0EmptyIntHandler)() = nullptr; static void (*fnRx0IntHandler)() = nullptr; +static void (*fnDataReg0EmptyIntHandler)() = nullptr; static void (*fnTx0IntHandler)() = nullptr; -ISR(USART0_UDRE_vect) -{ - if (fnDataReg0EmptyIntHandler) - fnDataReg0EmptyIntHandler(); -} - ISR(USART0_RX_vect) { if (fnRx0IntHandler) fnRx0IntHandler(); } +ISR(USART0_UDRE_vect) +{ + if (fnDataReg0EmptyIntHandler) + fnDataReg0EmptyIntHandler(); +} + ISR(USART0_TX_vect) { if (fnTx0IntHandler) @@ -120,8 +120,8 @@ class Hardware0 { static void init() FORCE_INLINE { - detail::fnDataReg0EmptyIntHandler = dataRegEmptyIntHandler; detail::fnRx0IntHandler = rxIntHandler; + detail::fnDataReg0EmptyIntHandler = dataRegEmptyIntHandler; detail::fnTx0IntHandler = txIntHandler; HardwareImpl::init(); @@ -140,12 +140,12 @@ class Hardware0 { using HardwareImpl = detail::Hardware; - static void dataRegEmptyIntHandler() + static void rxIntHandler() { // TODO } - static void rxIntHandler() + static void dataRegEmptyIntHandler() { // TODO } diff --git a/hardware1.hpp b/hardware1.hpp index 6e9c47b..78b28ca 100644 --- a/hardware1.hpp +++ b/hardware1.hpp @@ -59,22 +59,22 @@ constexpr int operator<<(const int &lhs, const ControlFlagsB1 &rhs) { return lhs constexpr int operator<<(const int &lhs, const ControlFlagsC1 &rhs) { return lhs << static_cast(rhs); } // clang-format on -static void (*fnDataReg1EmptyIntHandler)() = nullptr; static void (*fnRx1IntHandler)() = nullptr; +static void (*fnDataReg1EmptyIntHandler)() = nullptr; static void (*fnTx1IntHandler)() = nullptr; -ISR(USART1_UDRE_vect) -{ - if (fnDataReg1EmptyIntHandler) - fnDataReg1EmptyIntHandler(); -} - ISR(USART1_RX_vect) { if (fnRx1IntHandler) fnRx1IntHandler(); } +ISR(USART1_UDRE_vect) +{ + if (fnDataReg1EmptyIntHandler) + fnDataReg1EmptyIntHandler(); +} + ISR(USART1_TX_vect) { if (fnTx1IntHandler) @@ -124,8 +124,8 @@ class Hardware1 { static void init() FORCE_INLINE { - detail::fnDataReg1EmptyIntHandler = dataRegEmptyIntHandler; detail::fnRx1IntHandler = rxIntHandler; + detail::fnDataReg1EmptyIntHandler = dataRegEmptyIntHandler; detail::fnTx1IntHandler = txIntHandler; HardwareImpl::init(); @@ -144,12 +144,12 @@ class Hardware1 { using HardwareImpl = detail::Hardware; - static void dataRegEmptyIntHandler() + static void rxIntHandler() { // TODO } - static void rxIntHandler() + static void dataRegEmptyIntHandler() { // TODO }