Change interrupt handler technique to not rely on function pointer and instead use user-facing macros
This commit is contained in:
21
uart.hpp
21
uart.hpp
@@ -5,9 +5,7 @@
|
||||
#include "config.hpp"
|
||||
#include "software.hpp"
|
||||
|
||||
#undef UART0_INT_VECTORS
|
||||
#include "hardware0.hpp"
|
||||
#undef UART1_INT_VECTORS
|
||||
#include "hardware1.hpp"
|
||||
|
||||
#include "../flash/flash.hpp"
|
||||
@@ -356,6 +354,25 @@ class Uart {
|
||||
{
|
||||
static_assert(type::always_false_v<Ts...>, "Not implemented");
|
||||
}
|
||||
|
||||
private:
|
||||
friend void ::USART0_RX_vect();
|
||||
friend void ::USART0_UDRE_vect();
|
||||
|
||||
#ifdef HAS_UART1
|
||||
friend void ::USART1_RX_vect();
|
||||
friend void ::USART1_UDRE_vect();
|
||||
#endif
|
||||
|
||||
static void rxIntHandler() FORCE_INLINE
|
||||
{
|
||||
Driver::rxIntHandler();
|
||||
}
|
||||
|
||||
static void dataRegEmptyIntHandler() FORCE_INLINE
|
||||
{
|
||||
Driver::dataRegEmptyIntHandler();
|
||||
}
|
||||
};
|
||||
|
||||
template <typename cfg = Config<>>
|
||||
|
||||
Reference in New Issue
Block a user