/**
*   @file    Eth_Buffers.c
*   @implements Eth_Buffers.c_Artifact
*   @version 1.0.0
*
*  @brief    AUTOSAR Eth driver buffers
*  @details  Definition of memory blocks used for storage of data buffers and related
*            buffer descriptors.
*
*   @addtogroup ETH_DRIVER
*   @{
*/
/*==================================================================================================
*   Project              : AUTOSAR 4.3 MCAL
*   Platform             : PA
*   Peripheral           : FEC
*   Dependencies         : 
*
*   Autosar Version      : 4.3.1
*   Autosar Revision     : ASR_REL_4_3_REV_0001
*   Autosar Conf.Variant :
*   SW Version           : 1.0.0
*   Build Version        : MPC5777C_MCAL_1_0_0_RTM_ASR_REL_4_3_REV_0001_20190315
*
*   (c) Copyright 2006-2016 Freescale Semiconductor, Inc. 
*       Copyright 2017-2019 NXP
*   All Rights Reserved.
==================================================================================================*/
/*==================================================================================================
==================================================================================================*/

#ifdef __cplusplus
extern "C"{
#endif

/**
* @page misra_violations MISRA-C:2012 violations
* 
* @section Eth_Buffers_c_REF_1
* Violates MISRA 2012 Required Directive 4.10, Precautions shall be taken in order to prevent the contents
* of a header file being included more than once. This comes from the order of includes in the .c file
* and from include dependencies. As a safe approach, any file must include all its dependencies.
* Header files are already protected against double inclusions. The inclusion of Eth_Memmap.h is as
* per AUTOSAR requirement (SWS_MemMap_00003)
*
* @section [global]
*          Violates MISRA 2012 Required Rule 5.1, External identifiers shall be distinct.
*          The used compilers use more than 31 chars for identifiers.
*
* @section [global]
*          Violates MISRA 2012 Required Rule 5.2, Identifiers declared in the same scope and name space shall be distinct.
*          The used compilers use more than 31 chars for identifiers.
*
* @section [global]
*          Violates MISRA 2012 Required Rule 5.4, Macro identifiers shall be distinct.
*          The used compilers use more than 31 chars for identifiers.
*
* @section [global]
*          Violates MISRA 2012 Required Rule 5.5, Identifiers shall be distinct from macro names.
*          The used compilers use more than 31 chars for identifiers.
*
* @section Eth_Buffers_c_REF_2
* Violates MISRA 2012 Advisory Rule 20.1, #include directives should only be preceded by preprocessor 
* directives or comments. AUTOSAR imposes the specification of the sections in which certain parts
* of the driver must be placed.
*
*/

/*==================================================================================================
*                                        INCLUDE FILES
* 1) system and project includes
* 2) needed interfaces from external units
* 3) internal and external interfaces from this unit
==================================================================================================*/
#include "Eth.h"

/*==================================================================================================
*                              SOURCE FILE VERSION INFORMATION
==================================================================================================*/
#define ETH_VENDOR_ID_C                      43
#define ETH_AR_RELEASE_MAJOR_VERSION_C       4
#define ETH_AR_RELEASE_MINOR_VERSION_C       3
#define ETH_AR_RELEASE_REVISION_VERSION_C    1
#define ETH_SW_MAJOR_VERSION_C               1
#define ETH_SW_MINOR_VERSION_C               0
#define ETH_SW_PATCH_VERSION_C               0

/*==================================================================================================
*                                     FILE VERSION CHECKS
==================================================================================================*/
/* Check if current file and ETH header file are of the same vendor */
#if (ETH_VENDOR_ID_C != ETH_VENDOR_ID)
    #error "Eth_Buffers.c and Eth.h have different vendor ids"
#endif
/* Check if current file and ETH header file are of the same Autosar version */
#if ((ETH_AR_RELEASE_MAJOR_VERSION_C    != ETH_AR_RELEASE_MAJOR_VERSION) || \
     (ETH_AR_RELEASE_MINOR_VERSION_C    != ETH_AR_RELEASE_MINOR_VERSION) || \
     (ETH_AR_RELEASE_REVISION_VERSION_C != ETH_AR_RELEASE_REVISION_VERSION))
    #error "AutoSar Version Numbers of Eth_Buffers.c and Eth.h are different"
#endif
/* Check if current file and ETH header file are of the same Software version */
#if ((ETH_SW_MAJOR_VERSION_C != ETH_SW_MAJOR_VERSION) || \
     (ETH_SW_MINOR_VERSION_C != ETH_SW_MINOR_VERSION) || \
     (ETH_SW_PATCH_VERSION_C != ETH_SW_PATCH_VERSION))
    #error "Software Version Numbers of Eth_Buffers.c and Eth.h are different"
#endif

/*==================================================================================================
*                          LOCAL TYPEDEFS (STRUCTURES, UNIONS, ENUMS)
==================================================================================================*/


/*==================================================================================================
*                                       LOCAL MACROS
==================================================================================================*/


/*==================================================================================================
*                                      LOCAL CONSTANTS
==================================================================================================*/


/*==================================================================================================
*                                      LOCAL VARIABLES
==================================================================================================*/


/*==================================================================================================
*                                      GLOBAL CONSTANTS
==================================================================================================*/


/*==================================================================================================
*                                      GLOBAL VARIABLES
==================================================================================================*/
/* Start of the cache disabled memory section */
#define ETH_START_SEC_VAR_NO_INIT_UNSPECIFIED_NO_CACHEABLE
/* @violates @ref Eth_Buffers_c_REF_1 This violation is not fixed since the inclusion of Eth_MemMap.h is as per AUTOSAR requirement*/
#include "Eth_MemMap.h"

/**
* @var Eth_Buffers
* @brief Memory space used for the Ethernet driver buffers
* @details The memory space occupied by this array is internally divided into the receive
*          buffers and their descriptors. Its size, @c ETH_TX_BUF_MEM_SIZE, is computed by
*          the configuration tool based on the number and sizes of the buffers.
*/
/* Make the variable properly aligned */

VAR(uint8, ETH_VAR) Eth_TxBuffers[ETH_MAX_CONTROLLER_CFG][ETH_TX_BUF_MEM_SIZE];


/**
* @var Eth_Buffers
* @brief Memory space used for the Ethernet driver transmit buffers
* @details The memory space occupied by this array is internally divided into the transmit
*          buffers and their descriptors. Its size, @c ETH_RX_BUF_MEM_SIZE, is computed by
*          the configuration tool based on the number and sizes of the buffers.
*/
/* Make the variable properly aligned */


VAR(uint8, ETH_VAR) Eth_RxBuffers[ETH_MAX_CONTROLLER_CFG][ETH_RX_BUF_MEM_SIZE];


/* End of the cache disabled memory section */

#define ETH_STOP_SEC_VAR_NO_INIT_UNSPECIFIED_NO_CACHEABLE
/* @violates @ref Eth_Buffers_c_REF_1 This violation is not fixed since the inclusion of Eth_MemMap.h is as per AUTOSAR requirement*/
/* @violates @ref Eth_Buffers_c_REF_2 Eth_MemMap.h is included after each section define in order to set the current memory section as defined by AUTOSAR */
#include "Eth_MemMap.h"

/*==================================================================================================
*                                   LOCAL FUNCTION PROTOTYPES
==================================================================================================*/


/*==================================================================================================
*                                       LOCAL FUNCTIONS
==================================================================================================*/

#ifdef __cplusplus
}
#endif
/** @} */
