diff --git a/hardware0.hpp b/hardware0.hpp index 9260d68..009241d 100644 --- a/hardware0.hpp +++ b/hardware0.hpp @@ -128,7 +128,7 @@ class Hardware0 ////////////////////////////////////////////////////////////////////////// -#ifndef UART0_NO_INT_VECTORS +#ifdef UART0_INT_VECTORS #include @@ -164,4 +164,6 @@ ISR(USART0_UDRE_vect) } // namespace detail } // namespace uart +#undef UART0_INT_VECTORS + #endif diff --git a/hardware1.hpp b/hardware1.hpp index 42a8c41..97b2b3a 100644 --- a/hardware1.hpp +++ b/hardware1.hpp @@ -132,7 +132,7 @@ class Hardware1 ////////////////////////////////////////////////////////////////////////// -#ifndef UART1_NO_INT_VECTORS +#ifdef UART1_INT_VECTORS #include @@ -161,4 +161,6 @@ ISR(USART1_UDRE_vect) } // namespace detail } // namespace uart +#undef UART1_INT_VECTORS + #endif diff --git a/uart.hpp b/uart.hpp index 77aa096..fb2f715 100644 --- a/uart.hpp +++ b/uart.hpp @@ -3,11 +3,14 @@ #include #include "config.hpp" -#include "hardware0.hpp" -#include "hardware1.hpp" #include "software.hpp" #include "utils.hpp" +#undef UART0_INT_VECTORS +#include "hardware0.hpp" +#undef UART1_INT_VECTORS +#include "hardware1.hpp" + #include "../flash/flash.hpp" #define FORCE_INLINE __attribute__((always_inline))