1 /* 2 * Copyright 2021-2022 NXP 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 /** 8 * @file Mru_Ip.h 9 * 10 * 11 * @brief MRU IP driver header file. 12 * @details MRU IP driver header file. 13 14 * @addtogroup MRU_IP_DRIVER Mru Ip Driver 15 * @{ 16 */ 17 18 #ifndef MRU_IP_H 19 #define MRU_IP_H 20 21 #ifdef __cplusplus 22 extern "C"{ 23 #endif 24 25 26 27 /*================================================================================================== 28 * INCLUDE FILES 29 * 1) system and project includes 30 * 2) needed interfaces from external units 31 * 3) internal and external interfaces from this unit 32 ==================================================================================================*/ 33 #include "Mru_Ip_Types.h" 34 /*================================================================================================== 35 * SOURCE FILE VERSION INFORMATION 36 ==================================================================================================*/ 37 #define MRU_IP_VENDOR_ID 43 38 #define MRU_IP_AR_RELEASE_MAJOR_VERSION 4 39 #define MRU_IP_AR_RELEASE_MINOR_VERSION 7 40 #define MRU_IP_AR_RELEASE_REVISION_VERSION 0 41 #define MRU_IP_SW_MAJOR_VERSION 0 42 #define MRU_IP_SW_MINOR_VERSION 9 43 #define MRU_IP_SW_PATCH_VERSION 0 44 /*================================================================================================== 45 * FILE VERSION CHECKS 46 ==================================================================================================*/ 47 /* Check if Mru_Ip.h and Mru_Ip_Types.h are of the same vendor */ 48 #if (MRU_IP_VENDOR_ID != MRU_IP_TYPES_VENDOR_ID) 49 #error "Mru_Ip.h and Mru_Ip_Types.h have different vendor ids" 50 #endif 51 /* Check if Mru_Ip.h file and Mru_Ip_Types.h file are of the same Autosar version */ 52 #if ((MRU_IP_AR_RELEASE_MAJOR_VERSION != MRU_IP_TYPES_AR_RELEASE_MAJOR_VERSION) || \ 53 (MRU_IP_AR_RELEASE_MINOR_VERSION != MRU_IP_TYPES_AR_RELEASE_MINOR_VERSION) || \ 54 (MRU_IP_AR_RELEASE_REVISION_VERSION != MRU_IP_TYPES_AR_RELEASE_REVISION_VERSION)) 55 #error "AutoSar Version Numbers of Mru_Ip.h and Mru_Ip_Types.h are different" 56 #endif 57 #if ((MRU_IP_SW_MAJOR_VERSION != MRU_IP_TYPES_SW_MAJOR_VERSION) || \ 58 (MRU_IP_SW_MINOR_VERSION != MRU_IP_TYPES_SW_MINOR_VERSION) || \ 59 (MRU_IP_SW_PATCH_VERSION != MRU_IP_TYPES_SW_PATCH_VERSION)) 60 #error "Software Version Numbers of Mru_Ip.h and Mru_Ip_Types.h are different" 61 #endif 62 /*================================================================================================== 63 * CONSTANTS 64 ==================================================================================================*/ 65 /*================================================================================================== 66 * DEFINES AND MACROS 67 ==================================================================================================*/ 68 /*================================================================================================== 69 * ENUMS 70 ==================================================================================================*/ 71 /*================================================================================================== 72 * STRUCTURES AND OTHER TYPEDEFS 73 ==================================================================================================*/ 74 /*================================================================================================== 75 * GLOBAL VARIABLE DECLARATIONS 76 ==================================================================================================*/ 77 #define PLATFORM_START_SEC_CONFIG_DATA_UNSPECIFIED 78 #include "Platform_MemMap.h" 79 /** 80 * @brief Export the configurations. 81 */ 82 MRU_IP_CONFIG_EXT 83 84 #define PLATFORM_STOP_SEC_CONFIG_DATA_UNSPECIFIED 85 #include "Platform_MemMap.h" 86 /*================================================================================================== 87 * FUNCTION PROTOTYPES 88 ==================================================================================================*/ 89 #define PLATFORM_START_SEC_CODE 90 #include "Platform_MemMap.h" 91 92 /** 93 * @brief MRU peripheral initialization. 94 * @details The function initialize the MRU Unit specified in the configuration. 95 * 96 * @param[in] HWUnitConfigPtr - pointer to the specified MRU Unit configuration. 97 * 98 * @implements Mru_Ip_Init_Activity 99 */ 100 void Mru_Ip_Init(const Mru_Ip_ConfigType *HWUnitConfigPtr); 101 102 /** 103 * @brief MRU transmission. 104 * @details This function writes the data to Mailboxes using the channel specified. 105 * 106 * @param[in] TransmitChCfgPtr - pointer to the channel configuration where contains list of mailboxes to be written. 107 * @param[in] TxBufferPtr - pointer to transmit buffer. 108 * 109 * @return MRU_IP_STATUS_SUCCESS: Transmission command has been accepted. 110 * MRU_IP_STATUS_FAIL: Transmission command has not been accepted. 111 * 112 * @implements Mru_Ip_Transmit_Activity 113 */ 114 Mru_Ip_StatusType Mru_Ip_Transmit(const Mru_Ip_TransmitChannelType *TransmitChCfgPtr, 115 const uint32 *TxBufferPtr 116 ); 117 118 119 void Mru_Ip_IrqHandler(uint8 InstanceId, uint8 IntGroupId); 120 121 #define PLATFORM_STOP_SEC_CODE 122 #include "Platform_MemMap.h" 123 124 #ifdef __cplusplus 125 } 126 #endif 127 128 #endif /* MRU_IP_H */ 129 130 /** @} */ 131 132