Changed library so that user has to explicitly include hardware header with int vector define set to get ISR

This commit is contained in:
BlackMark 2019-08-15 18:58:25 +02:00
parent f6df6a6a18
commit 0532bf48b0
3 changed files with 11 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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))