Changed interrupt order to match vector numbers
This commit is contained in:
@@ -59,22 +59,22 @@ constexpr int operator<<(const int &lhs, const ControlFlagsB1 &rhs) { return lhs
|
||||
constexpr int operator<<(const int &lhs, const ControlFlagsC1 &rhs) { return lhs << static_cast<int>(rhs); }
|
||||
// clang-format on
|
||||
|
||||
static void (*fnDataReg1EmptyIntHandler)() = nullptr;
|
||||
static void (*fnRx1IntHandler)() = nullptr;
|
||||
static void (*fnDataReg1EmptyIntHandler)() = nullptr;
|
||||
static void (*fnTx1IntHandler)() = nullptr;
|
||||
|
||||
ISR(USART1_UDRE_vect)
|
||||
{
|
||||
if (fnDataReg1EmptyIntHandler)
|
||||
fnDataReg1EmptyIntHandler();
|
||||
}
|
||||
|
||||
ISR(USART1_RX_vect)
|
||||
{
|
||||
if (fnRx1IntHandler)
|
||||
fnRx1IntHandler();
|
||||
}
|
||||
|
||||
ISR(USART1_UDRE_vect)
|
||||
{
|
||||
if (fnDataReg1EmptyIntHandler)
|
||||
fnDataReg1EmptyIntHandler();
|
||||
}
|
||||
|
||||
ISR(USART1_TX_vect)
|
||||
{
|
||||
if (fnTx1IntHandler)
|
||||
@@ -124,8 +124,8 @@ class Hardware1<mode, cfg, Driven::INTERRUPT> {
|
||||
|
||||
static void init() FORCE_INLINE
|
||||
{
|
||||
detail::fnDataReg1EmptyIntHandler = dataRegEmptyIntHandler;
|
||||
detail::fnRx1IntHandler = rxIntHandler;
|
||||
detail::fnDataReg1EmptyIntHandler = dataRegEmptyIntHandler;
|
||||
detail::fnTx1IntHandler = txIntHandler;
|
||||
|
||||
HardwareImpl::init();
|
||||
@@ -144,12 +144,12 @@ class Hardware1<mode, cfg, Driven::INTERRUPT> {
|
||||
using HardwareImpl = detail::Hardware<detail::Registers1, detail::ControlFlagsA1, detail::ControlFlagsB1,
|
||||
detail::ControlFlagsC1, cfg, mode, Driven::INTERRUPT>;
|
||||
|
||||
static void dataRegEmptyIntHandler()
|
||||
static void rxIntHandler()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
static void rxIntHandler()
|
||||
static void dataRegEmptyIntHandler()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user