|
| 1 | +/* |
| 2 | + * Copyright 2021-2025 NXP |
| 3 | + * |
| 4 | + * SPDX-License-Identifier: BSD-3-Clause |
| 5 | + */ |
| 6 | + |
| 7 | +#ifndef PSI5_IP_CFG_H |
| 8 | +#define PSI5_IP_CFG_H |
| 9 | + |
| 10 | +/** |
| 11 | +* @file Psi5_Ip_Cfg.h |
| 12 | +* |
| 13 | +* @addtogroup PSI5_IP PSI5 IPV Driver |
| 14 | +* @{ |
| 15 | +*/ |
| 16 | + |
| 17 | +#ifdef __cplusplus |
| 18 | +extern "C"{ |
| 19 | +#endif |
| 20 | +/*================================================================================================== |
| 21 | +* INCLUDE FILES |
| 22 | +* 1) system and project includes |
| 23 | +* 2) needed interfaces from external units |
| 24 | +* 3) internal and external interfaces from this unit |
| 25 | +==================================================================================================*/ |
| 26 | +#include "Mcal.h" |
| 27 | + |
| 28 | +#include "Psi5_Ip_Init_PBcfg.h" |
| 29 | + |
| 30 | +#include "Psi5_Ip_Types.h" |
| 31 | +#include "Psi5_Ip_Cfg_Defines.h" |
| 32 | +#if (STD_ON == PSI5_IP_DMA_IS_USED) |
| 33 | +#include "CDD_Mcl.h" |
| 34 | +#endif |
| 35 | +/*================================================================================================== |
| 36 | +* SOURCE FILE VERSION INFORMATION |
| 37 | +==================================================================================================*/ |
| 38 | +#define PSI5_IP_CFG_VENDOR_ID 43 |
| 39 | +#define PSI5_IP_CFG_AR_RELEASE_MAJOR_VERSION 4 |
| 40 | +#define PSI5_IP_CFG_AR_RELEASE_MINOR_VERSION 7 |
| 41 | +#define PSI5_IP_CFG_AR_RELEASE_REVISION_VERSION 0 |
| 42 | +#define PSI5_IP_CFG_SW_MAJOR_VERSION 2 |
| 43 | +#define PSI5_IP_CFG_SW_MINOR_VERSION 0 |
| 44 | +#define PSI5_IP_CFG_SW_PATCH_VERSION 1 |
| 45 | + |
| 46 | +/*================================================================================================== |
| 47 | +* FILE VERSION CHECKS |
| 48 | +==================================================================================================*/ |
| 49 | +/* Check if Psi5_Ip_Cfg.h and Psi5_Ip_Init_PBcfg.h header file are of the same vendor */ |
| 50 | +#if (PSI5_IP_CFG_VENDOR_ID != PSI5_IP_INIT_PBCFG_VENDOR_ID) |
| 51 | + #error "Psi5_Ip_Cfg.h and Psi5_Ip_Init_PBcfg.h have different vendor ids" |
| 52 | +#endif |
| 53 | +/* Check if Psi5_Ip_Cfg.h and Psi5_Ip_Init_PBcfg.h header file are of the same Autosar version */ |
| 54 | +#if ((PSI5_IP_CFG_AR_RELEASE_MAJOR_VERSION != PSI5_IP_INIT_PBCFG_AR_RELEASE_MAJOR_VERSION) || \ |
| 55 | + (PSI5_IP_CFG_AR_RELEASE_MINOR_VERSION != PSI5_IP_INIT_PBCFG_AR_RELEASE_MINOR_VERSION) || \ |
| 56 | + (PSI5_IP_CFG_AR_RELEASE_REVISION_VERSION != PSI5_IP_INIT_PBCFG_AR_RELEASE_REVISION_VERSION)) |
| 57 | + #error "AUTOSAR Version Numbers of Psi5_Ip_Cfg.h and Psi5_Ip_Init_PBcfg.h are different" |
| 58 | +#endif |
| 59 | +/* Check if Psi5_Ip_Cfg.h and Psi5_Ip_Init_PBcfg.h header file are of the same software version */ |
| 60 | +#if ((PSI5_IP_CFG_SW_MAJOR_VERSION != PSI5_IP_INIT_PBCFG_SW_MAJOR_VERSION) || \ |
| 61 | + (PSI5_IP_CFG_SW_MINOR_VERSION != PSI5_IP_INIT_PBCFG_SW_MINOR_VERSION) || \ |
| 62 | + (PSI5_IP_CFG_SW_PATCH_VERSION != PSI5_IP_INIT_PBCFG_SW_PATCH_VERSION)) |
| 63 | + #error "Software Version Numbers of Psi5_Ip_Cfg.h and Psi5_Ip_Init_PBcfg.h are different" |
| 64 | +#endif |
| 65 | + |
| 66 | +/* Checks against Psi5_Ip_Types.h */ |
| 67 | +#if (PSI5_IP_CFG_VENDOR_ID != PSI5_IP_TYPES_VENDOR_ID) |
| 68 | + #error "Psi5_Ip_Cfg.h and Psi5_Ip_Types.h have different vendor ids" |
| 69 | +#endif |
| 70 | +#if ((PSI5_IP_CFG_AR_RELEASE_MAJOR_VERSION != PSI5_IP_TYPES_AR_RELEASE_MAJOR_VERSION) || \ |
| 71 | + (PSI5_IP_CFG_AR_RELEASE_MINOR_VERSION != PSI5_IP_TYPES_AR_RELEASE_MINOR_VERSION) || \ |
| 72 | + (PSI5_IP_CFG_AR_RELEASE_REVISION_VERSION != PSI5_IP_TYPES_AR_RELEASE_REVISION_VERSION)) |
| 73 | + #error "AUTOSAR Version Numbers of Psi5_Ip.h and Psi5_Ip_Types.h are different" |
| 74 | +#endif |
| 75 | +#if ((PSI5_IP_CFG_SW_MAJOR_VERSION != PSI5_IP_TYPES_SW_MAJOR_VERSION) || \ |
| 76 | + (PSI5_IP_CFG_SW_MINOR_VERSION != PSI5_IP_TYPES_SW_MINOR_VERSION) || \ |
| 77 | + (PSI5_IP_CFG_SW_PATCH_VERSION != PSI5_IP_TYPES_SW_PATCH_VERSION)) |
| 78 | + #error "Software Version Numbers of Psi5_Ip_Cfg.h and Psi5_Ip_Types.h are different" |
| 79 | +#endif |
| 80 | + |
| 81 | +/* Checks against Psi5_Ip_Cfg_Defines.h */ |
| 82 | +#if (PSI5_IP_CFG_VENDOR_ID != PSI5_IP_CFG_DEFINES_VENDOR_ID) |
| 83 | + #error "Psi5_Ip_Cfg.h and Psi5_Ip_Cfg_Defines.h have different vendor ids" |
| 84 | +#endif |
| 85 | +#if ((PSI5_IP_CFG_AR_RELEASE_MAJOR_VERSION != PSI5_IP_CFG_DEFINES_AR_RELEASE_MAJOR_VERSION) || \ |
| 86 | + (PSI5_IP_CFG_AR_RELEASE_MINOR_VERSION != PSI5_IP_CFG_DEFINES_AR_RELEASE_MINOR_VERSION) || \ |
| 87 | + (PSI5_IP_CFG_AR_RELEASE_REVISION_VERSION != PSI5_IP_CFG_DEFINES_AR_RELEASE_REVISION_VERSION)) |
| 88 | + #error "AUTOSAR Version Numbers of Psi5_Ip_Cfg.h and Psi5_Ip_Cfg_Defines.h are different" |
| 89 | +#endif |
| 90 | +#if ((PSI5_IP_CFG_SW_MAJOR_VERSION != PSI5_IP_CFG_DEFINES_SW_MAJOR_VERSION) || \ |
| 91 | + (PSI5_IP_CFG_SW_MINOR_VERSION != PSI5_IP_CFG_DEFINES_SW_MINOR_VERSION) || \ |
| 92 | + (PSI5_IP_CFG_SW_PATCH_VERSION != PSI5_IP_CFG_DEFINES_SW_PATCH_VERSION)) |
| 93 | + #error "Software Version Numbers of Psi5_Ip_Cfg.h and Psi5_Ip_Cfg_Defines.h are different" |
| 94 | +#endif |
| 95 | + |
| 96 | +#if (STD_ON == PSI5_IP_DMA_IS_USED) |
| 97 | +/* Check Psi5_Ip_Cfg.h against CDD_Mcl.h file versions */ |
| 98 | +#ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK |
| 99 | + #if ((PSI5_IP_CFG_AR_RELEASE_MAJOR_VERSION != CDD_MCL_AR_RELEASE_MAJOR_VERSION) || \ |
| 100 | + (PSI5_IP_CFG_AR_RELEASE_MINOR_VERSION != CDD_MCL_AR_RELEASE_MINOR_VERSION)) |
| 101 | + #error "AutoSar Version Numbers of Psi5_Ip_Cfg.h and CDD_Mcl.h are different" |
| 102 | + #endif |
| 103 | +#endif |
| 104 | +#endif |
| 105 | + |
| 106 | +/*================================================================================================== |
| 107 | +* DEFINES AND MACROS |
| 108 | +==================================================================================================*/ |
| 109 | +/** |
| 110 | +* @brief Collection of all configuration structures declarations. |
| 111 | +*/ |
| 112 | +#define PSI5_IP_CONFIG_EXT |
| 113 | +/** |
| 114 | +* @brief Switches the Psi5_Ip_Transmit() API ON or OFF. |
| 115 | +* |
| 116 | +* @api |
| 117 | +* |
| 118 | +*/ |
| 119 | +#define PSI5_IP_TRANSMIT_API (STD_ON) |
| 120 | + |
| 121 | +/** |
| 122 | +* @brief Switches the Psi5_Ip_GetTransmissionStatus() API ON or OFF. |
| 123 | +* |
| 124 | +* @api |
| 125 | +* |
| 126 | +*/ |
| 127 | +#define PSI5_IP_GET_TRANSMISSION_STATUS_API (STD_ON) |
| 128 | + |
| 129 | +/** |
| 130 | +* @brief Switches the Psi5_Ip_GetPsi5Frame() API ON or OFF. |
| 131 | +* |
| 132 | +* @api |
| 133 | +* |
| 134 | +*/ |
| 135 | +#define PSI5_IP_GET_PSI5_FRAME_API (STD_ON) |
| 136 | + |
| 137 | +/** |
| 138 | +* @brief Switches the Psi5_Ip_GetSmcFrame() API ON or OFF. |
| 139 | +* |
| 140 | +* @api |
| 141 | +* |
| 142 | +*/ |
| 143 | +#define PSI5_IP_GET_SMC_FRAME_API (STD_ON) |
| 144 | + |
| 145 | +/** |
| 146 | +* @brief Switches the Psi5_Ip_SetGlobalSync() API ON or OFF. |
| 147 | +* |
| 148 | +* @api |
| 149 | +* |
| 150 | +*/ |
| 151 | +#define PSI5_IP_SET_GLOBAL_SYNC_API (STD_ON) |
| 152 | + |
| 153 | +/** |
| 154 | +* @brief Switches the Psi5_Ip_SetChannelSync() API ON or OFF. |
| 155 | +* |
| 156 | +* @api |
| 157 | +* |
| 158 | +*/ |
| 159 | +#define PSI5_IP_SET_CHANNEL_SYNC_API (STD_ON) |
| 160 | + |
| 161 | +/*================================================================================================== |
| 162 | +* ENUMS |
| 163 | +==================================================================================================*/ |
| 164 | + |
| 165 | +/*================================================================================================== |
| 166 | +* STRUCTURES AND OTHER TYPEDEFS |
| 167 | +==================================================================================================*/ |
| 168 | + |
| 169 | +/*================================================================================================== |
| 170 | +* GLOBAL VARIABLE DECLARATIONS |
| 171 | +==================================================================================================*/ |
| 172 | + |
| 173 | +/*================================================================================================== |
| 174 | +* GLOBAL CONSTANTS |
| 175 | +==================================================================================================*/ |
| 176 | + |
| 177 | +/*================================================================================================== |
| 178 | +* FUNCTION PROTOTYPES |
| 179 | +==================================================================================================*/ |
| 180 | +#define PSI5_START_SEC_CODE |
| 181 | +#include "Psi5_MemMap.h" |
| 182 | + |
| 183 | +#define PSI5_STOP_SEC_CODE |
| 184 | +#include "Psi5_MemMap.h" |
| 185 | + |
| 186 | +#ifdef __cplusplus |
| 187 | +} |
| 188 | +#endif |
| 189 | + |
| 190 | +/** @} */ |
| 191 | + |
| 192 | +#endif /* PSI5_IP_CFG_H */ |
| 193 | + |
0 commit comments