Moved interrupt vectors to their own translation unit to solve redefinition error
This commit is contained in:
@@ -63,20 +63,8 @@ constexpr int operator<<(const int &lhs, const ControlFlagsB0 &rhs) { return lhs
|
||||
constexpr int operator<<(const int &lhs, const ControlFlagsC0 &rhs) { return lhs << static_cast<int>(rhs); }
|
||||
// clang-format on
|
||||
|
||||
static void (*fnRx0IntHandler)() = nullptr;
|
||||
static void (*fnDataReg0EmptyIntHandler)() = nullptr;
|
||||
|
||||
ISR(USART0_RX_vect)
|
||||
{
|
||||
if (fnRx0IntHandler)
|
||||
fnRx0IntHandler();
|
||||
}
|
||||
|
||||
ISR(USART0_UDRE_vect)
|
||||
{
|
||||
if (fnDataReg0EmptyIntHandler)
|
||||
fnDataReg0EmptyIntHandler();
|
||||
}
|
||||
extern void (*fnRx0IntHandler)();
|
||||
extern void (*fnDataReg0EmptyIntHandler)();
|
||||
|
||||
#else
|
||||
#error "This chip is not supported"
|
||||
|
||||
Reference in New Issue
Block a user