Changed library so that user has to explicitly include hardware header with int vector define set to get ISR
This commit is contained in:
parent
f6df6a6a18
commit
0532bf48b0
@ -128,7 +128,7 @@ class Hardware0<cfg, Driven::INTERRUPT, mode>
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef UART0_NO_INT_VECTORS
|
||||
#ifdef UART0_INT_VECTORS
|
||||
|
||||
#include <avr/interrupt.h>
|
||||
|
||||
@ -164,4 +164,6 @@ ISR(USART0_UDRE_vect)
|
||||
} // namespace detail
|
||||
} // namespace uart
|
||||
|
||||
#undef UART0_INT_VECTORS
|
||||
|
||||
#endif
|
||||
|
@ -132,7 +132,7 @@ class Hardware1<cfg, Driven::INTERRUPT, mode>
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef UART1_NO_INT_VECTORS
|
||||
#ifdef UART1_INT_VECTORS
|
||||
|
||||
#include <avr/interrupt.h>
|
||||
|
||||
@ -161,4 +161,6 @@ ISR(USART1_UDRE_vect)
|
||||
} // namespace detail
|
||||
} // namespace uart
|
||||
|
||||
#undef UART1_INT_VECTORS
|
||||
|
||||
#endif
|
||||
|
7
uart.hpp
7
uart.hpp
@ -3,11 +3,14 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#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))
|
||||
|
Loading…
Reference in New Issue
Block a user