1 /*
2  * Copyright 2020-2023 NXP
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 /* Prevention from multiple including the same header */
8 #if !defined(TRGMUX_IP_HWACC_H_)
9 #define TRGMUX_IP_HWACC_H_
10 
11 /**
12 *   @file    Trgmux_Ip_HwAcc.c
13 *
14 *   @version 3.0.0
15 *
16 *   @brief   AUTOSAR Mcl - Trgmux Ip driver source file.
17 *   @details
18 *
19 *   @addtogroup TRGMUX_IP_DRIVER TRGMUX IP Driver
20 *   @{
21 */
22 
23 #ifdef __cplusplus
24 extern "C"{
25 #endif
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 "Trgmux_Ip_Devassert.h"
34 
35 /*==================================================================================================
36 *                                 SOURCE FILE VERSION INFORMATION
37 ==================================================================================================*/
38 #define TRGMUX_IP_HWACC_VENDOR_ID                    43
39 #define TRGMUX_IP_HWACC_MODULE_ID                    255
40 #define TRGMUX_IP_HWACC_AR_RELEASE_MAJOR_VERSION     4
41 #define TRGMUX_IP_HWACC_AR_RELEASE_MINOR_VERSION     7
42 #define TRGMUX_IP_HWACC_AR_RELEASE_REVISION_VERSION  0
43 #define TRGMUX_IP_HWACC_SW_MAJOR_VERSION             3
44 #define TRGMUX_IP_HWACC_SW_MINOR_VERSION             0
45 #define TRGMUX_IP_HWACC_SW_PATCH_VERSION             0
46 
47 /*==================================================================================================
48                                       FILE VERSION CHECKS
49 ==================================================================================================*/
50 /* Check if Trgmux_Ip_HwAcc.h file and Trgmux_Ip_Devassert.h file are of the same vendor */
51 #if (TRGMUX_IP_HWACC_VENDOR_ID != TRGMUX_IP_DEVASSERT_VENDOR_ID)
52     #error "Trgmux_Ip_HwAcc.h and Trgmux_Ip_Devassert.h have different vendor ids"
53 #endif
54 
55 /* Check if Trgmux_Ip_HwAcc.h file and Trgmux_Ip_Devassert.h file are of the same Autosar version */
56 #if ((TRGMUX_IP_HWACC_AR_RELEASE_MAJOR_VERSION != TRGMUX_IP_DEVASSERT_AR_RELEASE_MAJOR_VERSION) || \
57      (TRGMUX_IP_HWACC_AR_RELEASE_MINOR_VERSION != TRGMUX_IP_DEVASSERT_AR_RELEASE_MINOR_VERSION) || \
58      (TRGMUX_IP_HWACC_AR_RELEASE_REVISION_VERSION != TRGMUX_IP_DEVASSERT_AR_RELEASE_REVISION_VERSION) \
59     )
60     #error "AutoSar Version Numbers of Trgmux_Ip_HwAcc.h and Trgmux_Ip_Devassert.h are different"
61 #endif
62 
63 /* Check if Trgmux_Ip_HwAcc.h file and Trgmux_Ip_Devassert.h file are of the same Software version */
64 #if ((TRGMUX_IP_HWACC_SW_MAJOR_VERSION != TRGMUX_IP_DEVASSERT_SW_MAJOR_VERSION) || \
65      (TRGMUX_IP_HWACC_SW_MINOR_VERSION != TRGMUX_IP_DEVASSERT_SW_MINOR_VERSION) || \
66      (TRGMUX_IP_HWACC_SW_PATCH_VERSION != TRGMUX_IP_DEVASSERT_SW_PATCH_VERSION) \
67     )
68     #error "Software Version Numbers of Trgmux_Ip_HwAcc.h and Trgmux_Ip_Devassert.h are different"
69 #endif
70 
71 #if (STD_ON == TRGMUX_IP_IS_AVAILABLE)
72 /*==================================================================================================
73 *                                            CONSTANTS
74 ==================================================================================================*/
75 
76 /*==================================================================================================
77 *                                       DEFINES AND MACROS
78 ==================================================================================================*/
79 
80 /*==================================================================================================
81 *                                              ENUMS
82 ==================================================================================================*/
83 
84 /*==================================================================================================
85 *                                  STRUCTURES AND OTHER TYPEDEFS
86 ==================================================================================================*/
87 
88 /*==================================================================================================
89 *                                  GLOBAL VARIABLE DECLARATIONS
90 ==================================================================================================*/
91 
92 /*==================================================================================================
93 *                                       FUNCTION PROTOTYPES
94 ==================================================================================================*/
95 #define MCL_START_SEC_CODE
96 #include "Mcl_MemMap.h"
97 
98 Trgmux_Ip_StatusType hwAcc_Init(TRGMUX_Type * const pTrgmux, uint8 TrgmuxCount);
99 
100 void hwAcc_SetInputForOutput(TRGMUX_Type * const pTrgmux, uint8 Instance, const uint32 Input, const uint32 Output);
101 
102 void hwAcc_SetLockForOutput(TRGMUX_Type * const pTrgmux, const uint32 Output);
103 
104 boolean hwAcc_GetLockForOutput(const TRGMUX_Type * const pTrgmux, const uint32 Output);
105 
106 #define MCL_STOP_SEC_CODE
107 #include "Mcl_MemMap.h"
108 
109 #endif /* TRGMUX_IP_IS_AVAILABLE */
110 
111 #ifdef __cplusplus
112 }
113 #endif
114 
115 /** @} */
116 
117 #endif  /* #if !defined(TRGMUX_IP_HWACC_H_) */
118