/**
*   @file    Crypto_Private.h
*
*   @version 1.0.0
*   @brief   AUTOSAR Crypto - Crypto interface
*   @details API header for Crypto external declarations driver.
*
*   @addtogroup  Crypto
*   @{
*/
/*==================================================================================================
*   Project              : AUTOSAR 4.3 MCAL
*   Platform             : PA
*   Peripheral           : Crypto
*   Dependencies         : none
*
*   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.
==================================================================================================*/
/*==================================================================================================
==================================================================================================*/

#ifndef CRYPTO_PRIVATE_H
#define CRYPTO_PRIVATE_H

#ifdef __cplusplus
extern "C"{
#endif

/**
* @page misra_violations MISRA-C:2012 violations
*
* @section Crypto_Private_h_REF_1
* 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.
*
* @section Crypto_Private_h_REF_2
* 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 Crypto_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.
*/

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

/*==================================================================================================
*                              SOURCE FILE VERSION INFORMATION
==================================================================================================*/
#define CRYPTO_VENDOR_ID_PRIVATE                       43
#define CRYPTO_AR_RELEASE_MAJOR_VERSION_PRIVATE        4
#define CRYPTO_AR_RELEASE_MINOR_VERSION_PRIVATE        3
#define CRYPTO_AR_RELEASE_REVISION_VERSION_PRIVATE     1
#define CRYPTO_SW_MAJOR_VERSION_PRIVATE                1
#define CRYPTO_SW_MINOR_VERSION_PRIVATE                0
#define CRYPTO_SW_PATCH_VERSION_PRIVATE                0

/*==================================================================================================
*                                    FILE VERSION CHECKS
==================================================================================================*/
/* Check if Crypto private header file and Crypto Cfg header file are of the same vendor */
#if (CRYPTO_VENDOR_ID_PRIVATE != CRYPTO_VENDOR_ID_CFG)
    #error "Crypto_Private.h and Crypto_Cfg.h have different vendor ids"
#endif

/* Check if Crypto private header file and Crypto Cfg header file are of the same Autosar version */
#if ((CRYPTO_AR_RELEASE_MAJOR_VERSION_PRIVATE    != CRYPTO_AR_RELEASE_MAJOR_VERSION_CFG) || \
     (CRYPTO_AR_RELEASE_MINOR_VERSION_PRIVATE    != CRYPTO_AR_RELEASE_MINOR_VERSION_CFG) || \
     (CRYPTO_AR_RELEASE_REVISION_VERSION_PRIVATE != CRYPTO_AR_RELEASE_REVISION_VERSION_CFG) \
    )
    #error "AutoSar Version Numbers of Crypto_Private.h and Crypto_Cfg.h are different"
#endif

/* Check if Crypto private header file and Crypto Cfg header file are of the same Software version */
#if ((CRYPTO_SW_MAJOR_VERSION_PRIVATE != CRYPTO_SW_MAJOR_VERSION_CFG) || \
     (CRYPTO_SW_MINOR_VERSION_PRIVATE != CRYPTO_SW_MINOR_VERSION_CFG) || \
     (CRYPTO_SW_PATCH_VERSION_PRIVATE != CRYPTO_SW_PATCH_VERSION_CFG)    \
    )
    #error "Software Version Numbers of Crypto_Private.h and Crypto_Cfg.h are different"
#endif

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

/*==================================================================================================
*                                       DEFINES AND MACROS
==================================================================================================*/
/* Reserved value associated with invalid Crypto KeyId */
#define CRYPTO_INVALID_KEY_IDX_U32          ((uint32)0xFFFFFFFFU)

/*==================================================================================================
*                                             ENUMS
==================================================================================================*/

/*==================================================================================================
*                                 STRUCTURES AND OTHER TYPEDEFS
==================================================================================================*/

/*==================================================================================================
*                                GLOBAL VARIABLE DECLARATIONS
==================================================================================================*/
#define CRYPTO_START_SEC_VAR_INIT_UNSPECIFIED
/**
* @violates @ref Crypto_Private_h_REF_1 #include directives should only be preceded by preprocessor
* directives or comments.
*
* @violates @ref Crypto_Private_h_REF_2 Precautions shall be taken in order to prevent the contents
* of a header file being included more than once.
*/
#include "Crypto_MemMap.h"

extern P2VAR(Crypto_ObjectType, AUTOMATIC, CRYPTO_APPL_DATA) Crypto_aObjectList[CRYPTO_NUMBER_OF_DRIVER_OBJECTS_U32];

#define CRYPTO_STOP_SEC_VAR_INIT_UNSPECIFIED
/**
* @violates @ref Crypto_Private_h_REF_1 #include directives should only be preceded by preprocessor
* directives or comments.
*
* @violates @ref Crypto_Private_h_REF_2 Precautions shall be taken in order to prevent the contents
* of a header file being included more than once.
*/
#include "Crypto_MemMap.h"


#define CRYPTO_START_SEC_VAR_NO_INIT_UNSPECIFIED
/**
* @violates @ref Crypto_Private_h_REF_1 #include directives should only be preceded by preprocessor
* directives or comments.
*
* @violates @ref Crypto_Private_h_REF_2 Precautions shall be taken in order to prevent the contents
* of a header file being included more than once.
*/
#include "Crypto_MemMap.h"

extern P2FUNC (void, CRYPTO_CODE, Callback) (const Crypto_JobType* pJob, Std_ReturnType Result);

#define CRYPTO_STOP_SEC_VAR_NO_INIT_UNSPECIFIED
/**
* @violates @ref Crypto_Private_h_REF_1 #include directives should only be preceded by preprocessor
* directives or comments.
*
* @violates @ref Crypto_Private_h_REF_2 Precautions shall be taken in order to prevent the contents
* of a header file being included more than once.
*/
#include "Crypto_MemMap.h"


#if (STD_ON == CRYPTO_KEYS_EXIST)

#define CRYPTO_START_SEC_VAR_INIT_UNSPECIFIED
/**
* @violates @ref Crypto_Private_h_REF_1 #include directives should only be preceded by preprocessor
* directives or comments.
*
* @violates @ref Crypto_Private_h_REF_2 Precautions shall be taken in order to prevent the contents
* of a header file being included more than once.
*/
#include "Crypto_MemMap.h"

extern P2VAR(Crypto_KeyType,        AUTOMATIC, CRYPTO_APPL_DATA) Crypto_aKeyList[CRYPTO_NUMBER_OF_KEYS_U32];

extern P2VAR(Crypto_KeyElementType, AUTOMATIC, CRYPTO_APPL_DATA) Crypto_aKeyElementList[CRYPTO_NUMBER_OF_KEY_ELEMENTS_U32];

#define CRYPTO_STOP_SEC_VAR_INIT_UNSPECIFIED
/**
* @violates @ref Crypto_Private_h_REF_1 #include directives should only be preceded by preprocessor
* directives or comments.
*
* @violates @ref Crypto_Private_h_REF_2 Precautions shall be taken in order to prevent the contents
* of a header file being included more than once.
*/
#include "Crypto_MemMap.h"

#endif

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

#ifdef __cplusplus
}
#endif

#endif /* CRYPTO_PRIVATE_H */

/** @} */
