1 /*
2  * Copyright 2021-2023 NXP
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef SIUL2_DIO_IP_TRUSTEDFUNCTIONS_H
8 #define SIUL2_DIO_IP_TRUSTEDFUNCTIONS_H
9 
10 /**
11 *   @file Siul2_Dio_Ip_TrustedFunctions.h
12 *
13 *   @addtogroup Dio_IPL Dio IPL
14 *   @{
15 */
16 
17 #ifdef __cplusplus
18 extern "C"{
19 #endif
20 
21 #include "Std_Types.h"
22 
23 /*==================================================================================================
24 *                              SOURCE FILE VERSION INFORMATION
25 ==================================================================================================*/
26 #define SIUL2_DIO_IP_TRUSTEDFUNCTIONS_VENDOR_ID_H                       43
27 #define SIUL2_DIO_IP_TRUSTEDFUNCTIONS_AR_RELEASE_MAJOR_VERSION_H        4
28 #define SIUL2_DIO_IP_TRUSTEDFUNCTIONS_AR_RELEASE_MINOR_VERSION_H        7
29 #define SIUL2_DIO_IP_TRUSTEDFUNCTIONS_AR_RELEASE_REVISION_VERSION_H     0
30 #define SIUL2_DIO_IP_TRUSTEDFUNCTIONS_SW_MAJOR_VERSION_H                1
31 #define SIUL2_DIO_IP_TRUSTEDFUNCTIONS_SW_MINOR_VERSION_H                0
32 #define SIUL2_DIO_IP_TRUSTEDFUNCTIONS_SW_PATCH_VERSION_H                0
33 
34 
35 /*==================================================================================================
36 *                                     FILE VERSION CHECKS
37 ==================================================================================================*/
38 #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
39     /* Check if Siul2_Dio_Ip_TrustedFunctions.h and Std_Types.h file are of the same Autosar version */
40     #if ((SIUL2_DIO_IP_TRUSTEDFUNCTIONS_AR_RELEASE_MAJOR_VERSION_H != STD_AR_RELEASE_MAJOR_VERSION) || \
41          (SIUL2_DIO_IP_TRUSTEDFUNCTIONS_AR_RELEASE_MINOR_VERSION_H != STD_AR_RELEASE_MINOR_VERSION)    \
42         )
43         #error "AutoSar Version Numbers of Siul2_Dio_Ip_TrustedFunctions.h and Std_Types.h are different"
44     #endif
45 #endif
46 /*==================================================================================================
47 *                                      DEFINES AND MACROS
48 ==================================================================================================*/
49 
50 /*==================================================================================================
51                                        GLOBAL VARIABLES
52 ==================================================================================================*/
53 
54 /*==================================================================================================
55 *                                     FUNCTION PROTOTYPES
56 ==================================================================================================*/
57 
58 extern void Siul2_Dio_Ip_WritePinRunTime(Siul2_Dio_Ip_GpioType * const base,
59                                          Siul2_Dio_Ip_PinsChannelType pin,
60                                          Siul2_Dio_Ip_PinsLevelType value
61                                         );
62 
63 extern void Siul2_Dio_Ip_WritePinsRunTime(Siul2_Dio_Ip_GpioType * const base,
64                                           Siul2_Dio_Ip_PinsChannelType pins
65                                          );
66 
67 extern Siul2_Dio_Ip_PinsChannelType Siul2_Dio_Ip_GetPinsOutputRunTime(const Siul2_Dio_Ip_GpioType * const base);
68 
69 extern void Siul2_Dio_Ip_SetPinsRunTime(Siul2_Dio_Ip_GpioType * const base,
70                                         Siul2_Dio_Ip_PinsChannelType pins
71                                        );
72 
73 extern void Siul2_Dio_Ip_ClearPinsRunTime(Siul2_Dio_Ip_GpioType * const base,
74                                           Siul2_Dio_Ip_PinsChannelType pins
75                                          );
76 
77 extern void Siul2_Dio_Ip_TogglePinsRunTime(Siul2_Dio_Ip_GpioType * const base,
78                                            Siul2_Dio_Ip_PinsChannelType pins
79                                           );
80 
81 extern Siul2_Dio_Ip_PinsChannelType Siul2_Dio_Ip_ReadPinsRunTime(const Siul2_Dio_Ip_GpioType * const base);
82 
83 #if (STD_OFF == DIO_VIRTWRAPPER_SUPPORT)
84 extern void Siul2_Dio_Ip_MaskedWritePinsRunTime(uint8 u8Siul2Instance,
85                                                 uint8 u8PortId,
86                                                 Siul2_Dio_Ip_PinsChannelType pins,
87                                                 Siul2_Dio_Ip_PinsChannelType mask
88                                                );
89 #endif /* (STD_OFF == DIO_VIRTWRAPPER_SUPPORT) */
90 
91 extern Siul2_Dio_Ip_PinsLevelType Siul2_Dio_Ip_ReadPinRunTime(const Siul2_Dio_Ip_GpioType * const base,
92                                                               Siul2_Dio_Ip_PinsChannelType pin
93                                                              );
94 
95 extern Dio_LevelType Dio_ReadChannelRunTime(Dio_ChannelType ChannelId);
96 
97 extern void Dio_WriteChannelRunTime(Dio_ChannelType ChannelId,
98                                     Dio_LevelType Level
99                                    );
100 
101 #if (STD_ON == DIO_FLIP_CHANNEL_API)
102 extern Dio_LevelType Dio_FlipChannelRunTime(Dio_ChannelType ChannelId);
103 #endif /* (STD_ON == DIO_FLIP_CHANNEL_API) */
104 
105 #if (STD_OFF == DIO_VIRTWRAPPER_SUPPORT)
106 extern Dio_PortLevelType Dio_ReadPortRunTime(Dio_PortType PortId);
107 #endif /* (STD_OFF == DIO_VIRTWRAPPER_SUPPORT) */
108 
109 #if (STD_OFF == DIO_VIRTWRAPPER_SUPPORT)
110 extern void Dio_WritePortRunTime(Dio_PortType PortId,
111                                  Dio_PortLevelType Level
112                                 );
113 #endif /* (STD_OFF == DIO_VIRTWRAPPER_SUPPORT) */
114 
115 #if (STD_OFF == DIO_VIRTWRAPPER_SUPPORT)
116 extern Dio_PortLevelType Dio_ReadChannelGroupRunTime(const Dio_ChannelGroupType * pChannelGroupIdPtr);
117 #endif /* (STD_OFF == DIO_VIRTWRAPPER_SUPPORT) */
118 
119 #if (STD_OFF == DIO_VIRTWRAPPER_SUPPORT)
120 extern void Dio_WriteChannelGroupRunTime(const Dio_ChannelGroupType * pChannelGroupIdPtr,
121                                          Dio_PortLevelType Level
122                                         );
123 #endif /* (STD_OFF == DIO_VIRTWRAPPER_SUPPORT) */
124 
125 #if (STD_OFF == DIO_VIRTWRAPPER_SUPPORT)
126 #if ((STD_ON == DIO_MASKEDWRITEPORT_API) || defined(__DOXYGEN__))
127 extern void Dio_MaskedWritePortRunTime(Dio_PortType PortId,
128                                        Dio_PortLevelType Level,
129                                        Dio_PortLevelType Mask
130                                       );
131 #endif /* ((STD_ON == DIO_MASKEDWRITEPORT_API) || defined(__DOXYGEN__)) */
132 #endif /* (STD_OFF == DIO_VIRTWRAPPER_SUPPORT) */
133 
134 #ifdef __cplusplus
135 }
136 #endif
137 
138 /** @} */
139 
140 #endif /* SIUL2_DIO_IP_TRUSTEDFUNCTIONS_H */
141