29 lines
418 B
C++
29 lines
418 B
C++
#include "hardware1.hpp"
|
|
|
|
#include <avr/interrupt.h>
|
|
|
|
namespace uart {
|
|
namespace detail {
|
|
|
|
#if defined(__AVR_ATmega1284P__)
|
|
|
|
void (*fnRx1IntHandler)() = nullptr;
|
|
void (*fnDataReg1EmptyIntHandler)() = nullptr;
|
|
|
|
ISR(USART1_RX_vect)
|
|
{
|
|
if (fnRx1IntHandler)
|
|
fnRx1IntHandler();
|
|
}
|
|
|
|
ISR(USART1_UDRE_vect)
|
|
{
|
|
if (fnDataReg1EmptyIntHandler)
|
|
fnDataReg1EmptyIntHandler();
|
|
}
|
|
|
|
#endif
|
|
|
|
} // namespace detail
|
|
} // namespace uart
|