/* ======================================================================
 *   Copyright (C) 2022 Texas Instruments Incorporated
 *
 *   All rights reserved. Property of Texas Instruments Incorporated.
 *   Restricted rights to use, duplicate or disclose this code are
 *   granted through contract.
 *
 *   The program may not be used without the written permission
 *   of Texas Instruments Incorporated or against the terms and conditions
 *   stipulated in the agreement under which this program has been
 *   supplied.
 * ==================================================================== */

/**
 *  \file     Eth_Irq.h
 *
 *  \brief    This file contains ISR function declaration for ETH MCAL driver
 *
 */

/**
 *  \ingroup MCAL_ETH_API
 *  @{
 */

#ifndef ETH_IRQ_H_
#define ETH_IRQ_H_

/* ========================================================================== */
/*                             Include Files                                  */
/* ========================================================================== */

/* None */

#ifdef __cplusplus
extern "C"
{
#endif

/* ========================================================================== */
/*                           Macros & Typedefs                                */
/* ========================================================================== */

/**
 *  \name ETH Driver ISR SW Version Info
 *
 *  Defines for ETH Driver ISR version used for compatibility checks
 *  @{
 */
/** \brief Driver ISR Implementation Major Version */
#define ETH_IRQ_MAJOR_VERSION           (0U)
/** \brief Driver ISR Implementation Minor Version */
#define ETH_IRQ_MINOR_VERSION           (9U)
/** \brief Driver ISR Implementation Patch Version */
#define ETH_IRQ_PATCH_VERSION           (0U)
/* @} */

/**
 *  \name Eth Driver ISR category level
 *
 *  Defines for Eth Driver ISR ISR category level
 *  @{
 */
/** \brief void ISR type */
#define ETH_ISR_VOID                    (0x00U)
/** \brief Category 1 ISR type */
#define ETH_ISR_CAT1                    (0x01U)
/** \brief Category 2 ISR type */
#define ETH_ISR_CAT2                    (0x02U)
/* @} */

/* ========================================================================== */
/*                         Structures and Enums                               */
/* ========================================================================== */

/* None */

/* ========================================================================== */
/*                          Function Declarations                             */
/* ========================================================================== */

/**
 *  \brief ISR for frame reception interrupts of the indexed controller
 *
 *  \verbatim
 *  Service name      : Eth_RxIrqHdlr_0
 *  Syntax            : void Eth_RxIrqHdlr_0(void)
 *  Service ID[hex]   : 0x10
 *  Sync/Async        : Synchronous
 *  Reentrancy        : Non Reentrant.
 *  Parameters (in)   : None
 *  Parameters (inout): None
 *  Parameters (out)  : None
 *  Return value      : None
 *  Description       : Handles frame reception interrupts of the indexed
 *                      controller
 *  \endverbatim
 */
#if (ETH_ISR_TYPE == ETH_ISR_CAT1 || ETH_ISR_TYPE == ETH_ISR_VOID)
FUNC(void, ETH_CODE_ISR) Eth_RxIrqHdlr_0(void) __attribute__((target("arm")));
#elif (ETH_ISR_TYPE == ETH_ISR_CAT2)
/* Function prototype is declared by OS */
#endif

/**
 *  \brief ISR for frame transmission interrupts of the indexed controller
 *
 *  \verbatim
 *  Service name      : Eth_TxIrqHdlr_0
 *  Syntax            : void Eth_TxIrqHdlr_0(void)
 *  Service ID[hex]   : 0x11
 *  Sync/Async        : Synchronous
 *  Reentrancy        : Non Reentrant.
 *  Parameters (in)   : None
 *  Parameters (inout): None
 *  Parameters (out)  : None
 *  Return value      : None
 *  Description       : Handles frame transmission interrupts of the indexed
 *                      controller
 *  \endverbatim
 */

#if (ETH_ISR_TYPE == ETH_ISR_CAT1 || ETH_ISR_TYPE == ETH_ISR_VOID)
FUNC(void, ETH_CODE_ISR) Eth_TxIrqHdlr_0(void) __attribute__((target("arm")));
#elif (ETH_ISR_TYPE == ETH_ISR_CAT2)
/* Function prototype is declared by OS */
#endif

/**
 *  \brief ISR for misc. interrupts of the indexed controller
 *
 *  \verbatim
 *  Service name      : Eth_MiscIrqHdlr_0
 *  Syntax            : void Eth_MiscIrqHdlr_0(void)
 *  Service ID[hex]   : NA
 *  Sync/Async        : Synchronous
 *  Reentrancy        : Non Reentrant.
 *  Parameters (in)   : None
 *  Parameters (inout): None
 *  Parameters (out)  : None
 *  Return value      : None
 *  Description       : Handles misc. interrupts of the indexed
 *                      controller
 *  \endverbatim
 */
#if (ETH_ISR_TYPE == ETH_ISR_CAT1 || ETH_ISR_TYPE == ETH_ISR_VOID)
FUNC(void, ETH_CODE_ISR) Eth_MiscIrqHdlr_0(void)  __attribute__((target("arm")));
#elif (ETH_ISR_TYPE == ETH_ISR_CAT2)
/* Function prototype is declared by OS */
#endif

/**
 *  \brief ISR for Receive threshold interrupts of the indexed controller
 *
 *  \verbatim
 *  Service name      : Eth_RxThreshIrqHdlr_0
 *  Syntax            : void Eth_RxThreshIrqHdlr_0(void)
 *  Service ID[hex]   : NA
 *  Sync/Async        : Synchronous
 *  Reentrancy        : Non Reentrant.
 *  Parameters (in)   : None
 *  Parameters (inout): None
 *  Parameters (out)  : None
 *  Return value      : None
 *  Description       : Handles receive threshold interrupts of the indexed
 *                      controller
 *  \endverbatim
 */
#if (ETH_ISR_TYPE == ETH_ISR_CAT1 || ETH_ISR_TYPE == ETH_ISR_VOID)
void Eth_RxThreshIrqHdlr_0(void)  __attribute__((target("arm")));
#elif (ETH_ISR_TYPE == ETH_ISR_CAT2)
/* Function prototype is declared by OS */
#endif

#endif

#ifdef __cplusplus
}


#endif  /* #ifndef ETH_IRQ_H_ */

/* @} */
