Changed interrupt order to match vector numbers
This commit is contained in:
@@ -59,22 +59,22 @@ 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 (*fnDataReg0EmptyIntHandler)() = nullptr;
|
||||
static void (*fnRx0IntHandler)() = nullptr;
|
||||
static void (*fnDataReg0EmptyIntHandler)() = nullptr;
|
||||
static void (*fnTx0IntHandler)() = nullptr;
|
||||
|
||||
ISR(USART0_UDRE_vect)
|
||||
{
|
||||
if (fnDataReg0EmptyIntHandler)
|
||||
fnDataReg0EmptyIntHandler();
|
||||
}
|
||||
|
||||
ISR(USART0_RX_vect)
|
||||
{
|
||||
if (fnRx0IntHandler)
|
||||
fnRx0IntHandler();
|
||||
}
|
||||
|
||||
ISR(USART0_UDRE_vect)
|
||||
{
|
||||
if (fnDataReg0EmptyIntHandler)
|
||||
fnDataReg0EmptyIntHandler();
|
||||
}
|
||||
|
||||
ISR(USART0_TX_vect)
|
||||
{
|
||||
if (fnTx0IntHandler)
|
||||
@@ -120,8 +120,8 @@ class Hardware0<mode, cfg, Driven::INTERRUPT> {
|
||||
|
||||
static void init() FORCE_INLINE
|
||||
{
|
||||
detail::fnDataReg0EmptyIntHandler = dataRegEmptyIntHandler;
|
||||
detail::fnRx0IntHandler = rxIntHandler;
|
||||
detail::fnDataReg0EmptyIntHandler = dataRegEmptyIntHandler;
|
||||
detail::fnTx0IntHandler = txIntHandler;
|
||||
|
||||
HardwareImpl::init();
|
||||
@@ -140,12 +140,12 @@ class Hardware0<mode, cfg, Driven::INTERRUPT> {
|
||||
using HardwareImpl = detail::Hardware<detail::Registers0, detail::ControlFlagsA0, detail::ControlFlagsB0,
|
||||
detail::ControlFlagsC0, 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