/*
 * Copyright (C) 2020-2021 Aloysius Indrayanto
 *
 * This file is part of the eCxx library, see LICENSE file for the license details.
 */


#ifndef INCLUDE_ECXX_PLATFORM_AVRX_ISR_UART_CPP
#error "this file cannot be compiled directly"
#endif
#undef INCLUDE_ECXX_PLATFORM_AVRX_ISR_UART_CPP


//
// UART0 interrupt vectors
//
#ifdef ECXX_USART0_USART

// 'Rx Complete'
ISR(ECXX_USART0_RXC_VEC)
{ eCxx::uart0_rxComplete_isr(); }

// 'Data Register Empty'
ISR(ECXX_USART0_DRE_VEC)
{ eCxx::uart0_udrEmpty_isr(); }

#endif


//
// UART1 interrupt vectors
//
#ifdef ECXX_USART1_USART

// 'Rx Complete'
ISR(ECXX_USART1_RXC_VEC)
{ eCxx::uart1_rxComplete_isr(); }

// 'Data Register Empty'
ISR(ECXX_USART1_DRE_VEC)
{ eCxx::uart1_udrEmpty_isr(); }

#endif


//
// UART2 interrupt vectors
//
#ifdef ECXX_USART2_USART

// 'Rx Complete'
ISR(ECXX_USART2_RXC_VEC)
{ eCxx::uart2_rxComplete_isr(); }

// 'Data Register Empty'
ISR(ECXX_USART2_DRE_VEC)
{ eCxx::uart2_udrEmpty_isr(); }

#endif
