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 #ifndef LCU_IP_DRIVER_H_
9 #define LCU_IP_DRIVER_H_
10 
11 /**
12 *   @file    Lcu_Ip.h
13 *
14 *   @version 3.0.0
15 *
16 *   @brief   AUTOSAR Mcl - Lcu Ip driver header file.
17 *   @details
18 *
19 *   @addtogroup LCU_IP_DRIVER LCU 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 "Lcu_Ip_Cfg.h"
34 
35 /*==================================================================================================
36 *                                SOURCE FILE VERSION INFORMATION
37 ==================================================================================================*/
38 #define LCU_IP_VENDOR_ID                       43
39 #define LCU_IP_AR_RELEASE_MAJOR_VERSION        4
40 #define LCU_IP_AR_RELEASE_MINOR_VERSION        7
41 #define LCU_IP_AR_RELEASE_REVISION_VERSION     0
42 #define LCU_IP_SW_MAJOR_VERSION                3
43 #define LCU_IP_SW_MINOR_VERSION                0
44 #define LCU_IP_SW_PATCH_VERSION                0
45 
46 /*==================================================================================================
47                                       FILE VERSION CHECKS
48 ==================================================================================================*/
49 
50 /* Check if header file and Lcu_Ip_Cfg.h file are of the same vendor */
51 #if (LCU_IP_VENDOR_ID != LCU_IP_CFG_VENDOR_ID)
52     #error "Lcu_Ip.h and Lcu_Ip_Cfg.h have different vendor ids"
53 #endif
54 
55 /* Check if header file and Lcu_Ip_Cfg.h file are of the same Autosar version */
56 #if ((LCU_IP_AR_RELEASE_MAJOR_VERSION != LCU_IP_CFG_AR_RELEASE_MAJOR_VERSION) || \
57      (LCU_IP_AR_RELEASE_MINOR_VERSION != LCU_IP_CFG_AR_RELEASE_MINOR_VERSION) || \
58      (LCU_IP_AR_RELEASE_REVISION_VERSION != LCU_IP_CFG_AR_RELEASE_REVISION_VERSION) \
59     )
60     #error "AutoSar Version Numbers of Lcu_Ip.h and Lcu_Ip_Cfg.h are different"
61 #endif
62 
63 /* Check if header file and Lcu_Ip_Cfg.h file are of the same Software version */
64 #if ((LCU_IP_SW_MAJOR_VERSION != LCU_IP_CFG_SW_MAJOR_VERSION) || \
65      (LCU_IP_SW_MINOR_VERSION != LCU_IP_CFG_SW_MINOR_VERSION) || \
66      (LCU_IP_SW_PATCH_VERSION != LCU_IP_CFG_SW_PATCH_VERSION) \
67     )
68     #error "Software Version Numbers of Lcu_Ip.h and Lcu_Ip_Cfg.h are different"
69 #endif
70 
71 #if (STD_ON == LCU_IP_IS_AVAILABLE)
72 /*==================================================================================================
73 *                                            CONSTANTS
74 ==================================================================================================*/
75 
76 /*==================================================================================================
77 *                                       DEFINES AND MACROS
78 ==================================================================================================*/
79 
80 /*==================================================================================================
81 *                                              ENUMS
82 ==================================================================================================*/
83 /**
84  * @brief This type contains the LCU Input Param Type.
85  * @details The Parameters set specific functionalities for Input
86  *
87  * */
88 typedef enum
89 {
90     LCU_IP_INPUT_SET_MUX_SEL            = 0U,   /**< @brief [MUXSEL] Input MUX Select. */
91     LCU_IP_INPUT_SET_SW_SYNC_MODE       = 1U,   /**< @brief [SW_MODE] Specifies the software sync mode for the inputs to this LC.When Software Override is enabled (SWEN),these bits control whether Software Override Value (SWVALUE) changes occur immediately or on the rising edge of the selected sync pulse */
92     LCU_IP_INPUT_SET_SW_OVERRIDE_EN     = 2U,   /**< @brief [SWEN] Software override input enable */
93     LCU_IP_INPUT_SET_SW_VALUE           = 3U    /**< @brief [SWVALUE] Software override input value */
94 }Lcu_Ip_InputParamType;
95 
96 /**
97  * @brief This type contains the LCU Output Param Type.
98  * @details The Parameters set specific functionalities for Output
99  *
100  * */
101 typedef enum
102 {
103     LCU_IP_OUTPUT_SET_EN_DEBUG_MODE            =  0U,   /**< @brief [DBGEN] Enables outputs to continue operation in Debug mode */
104     LCU_IP_OUTPUT_SET_OUTPUT_ENABLE            =  1U,   /**< @brief [OUTEN] Enables LC outputs */
105     LCU_IP_OUTPUT_SET_LUT_CONTROL              =  2U,   /**< @brief [LUTCTRL] LUT control */
106     LCU_IP_OUTPUT_SET_LUT_RISE_FILTER          =  3U,   /**< @brief [LUT_RISE_FILT] LUT Rise Filter */
107     LCU_IP_OUTPUT_SET_LUT_FALL_FILTER          =  4U,   /**< @brief [LUT_FALL_FILT] LUT Fall Filter */
108     LCU_IP_OUTPUT_SET_EN_FORCE_DMA             =  5U,   /**< @brief [LUT_DMA_EN] Enables the generation of a DMA request when an LUT event occurs */
109     LCU_IP_OUTPUT_SET_EN_LUT_DMA               =  6U,   /**< @brief [FORCE_DMA_EN] Enables the generation of a DMA request when a force event occurs */
110     LCU_IP_OUTPUT_SET_EN_FORCE_INT             =  7U,   /**< @brief [LUT_INT_EN] Enables the generation of an interrupt request when an LUT event */
111     LCU_IP_OUTPUT_SET_EN_LUT_INT               =  8U,   /**< @brief [FORCE_INT_EN] Enables the generation of an interrupt request when a force event occurs */
112     LCU_IP_OUTPUT_SET_INVERT_OUTPUT            =  9U,   /**< @brief [OUTPOL] Set Output Polarity: invert or not. */
113     LCU_IP_OUTPUT_SET_FORCE_SIGNAL_SEL         = 10U,   /**< @brief [FORCE_SENSE] Select Force signal */
114     LCU_IP_OUTPUT_SET_CLEAR_FORCE_MODE         = 11U,   /**< @brief [FORCE_MODE] Force Clearing Mode */
115     LCU_IP_OUTPUT_SET_FORCE_SYNC_SEL           = 12U,   /**< @brief [SYNC_SEL] The Force Sync Select Parameter specifies which sync input to use for this output */
116     LCU_IP_OUTPUT_CLEAR_FORCE_STS              = 13U    /**< @brief [FORCESTS] Clear force event in STS */
117 }Lcu_Ip_OutputParamType;
118 
119 /**
120  * @brief This type contains the LCU Param Type to get information for input
121  * @details The Parameters get specific functionalities for Input
122  *
123  * */
124 typedef enum
125 {
126     LCU_IP_INPUT_GET_LOGIC_INPUT_STATE         = 0U,
127     LCU_IP_INPUT_GET_SW_OVERRIDE_STATE         = 1U,
128 }Lcu_Ip_LogicInputInfoParamType;
129 
130 /**
131  * @brief This type contains the LCU Param Type to get information for output
132  * @details The Parameters get specific functionalities for Output
133  *
134  * */
135 typedef enum
136 {
137     LCU_IP_OUTPUT_GET_LOGIC_OUTPUT_STATE       = 0U,
138     LCU_IP_OUTPUT_GET_FORCE_OUTPUT             = 1U,
139     LCU_IP_OUTPUT_GET_FORCE_STATUS             = 2U,
140     LCU_IP_OUTPUT_GET_LUT_STATUS               = 3U,
141     LCU_IP_OUTPUT_GET_COMBINE_FORCE_INPUT      = 4U,
142 }Lcu_Ip_LogicOutputInfoParamType;
143 
144 /*==================================================================================================
145 *                                  STRUCTURES AND OTHER TYPEDEFS
146 ==================================================================================================*/
147 /**
148  * @brief This type contains the Lcu Ip Multiple Inputs and Multiple Value.
149  * @details The Lcu Ip Multi Input Value contains a pair composed from Logic Input ID and the Value
150  *          of configuration.
151  *          The LogicInputId selects a Logic Input
152  *          The Value stores the configuration's value.
153  * */
154 typedef struct{
155     uint8 LogicInputId;
156     uint8 Value;
157 }Lcu_Ip_SyncInputValueType;
158 
159 /**
160  * @brief This type contains the Lcu Ip Multiple Outputs and Multiple Value.
161  * @details The Lcu Ip Multi Output Value contains a pair composed from Logic Output ID and the
162  *          Value of configuration.
163  *          The LogicOutputId selects a Logic Output
164  *          The Value stores the configuration's value.
165  * */
166 typedef struct{
167     uint8 LogicOutputId;
168     uint16 Value;
169 }Lcu_Ip_SyncOutputValueType;
170 
171 /**
172  * @brief This type contains the Lcu Ip Input with multiple value
173  * @details The Lcu Ip Input with Multiple Value contains a pair composed from Input Parameter and
174  *          Value of the Parameter.
175  *          The Lcu Ip Input Param Type selects a parameter from the Lcu_Ip_InputParamType enum
176  *          The Value stores the configuration's value.
177  * */
178 typedef struct{
179     Lcu_Ip_InputParamType Param;
180     uint8 Value;
181 }Lcu_Ip_AsyncInputValueType;
182 
183 /**
184  * @brief This type contains the Lcu Ip Output with multiple value
185  * @details The Lcu Ip Output with Multiple Value contains a pair composed from Output Parameter
186  *          and Value of the Parameter.
187  *          The Lcu Ip Output Param Type selects a parameter from the Lcu_Ip_OutputParamType enum
188  *          The Value stores the configuration's value.
189  * */
190 typedef struct{
191     Lcu_Ip_OutputParamType Param;
192     uint16 Value;
193 }Lcu_Ip_AsyncOutputValueType;
194 
195 /*==================================================================================================
196 *                                  GLOBAL VARIABLE DECLARATIONS
197 ==================================================================================================*/
198 
199 /*==================================================================================================
200 *                                       FUNCTION PROTOTYPES
201 ==================================================================================================*/
202 #define MCL_START_SEC_CODE
203 #include "Mcl_MemMap.h"
204 
205 /* Initializes the LCU IP Driver */
206 /**
207  * @brief This function initializes the Lcu Ip Driver.
208  * @details This service is a non reentrant function that shall initialize the Lcu Ip driver.
209  *          When enable multi cores, the API shall write the values into the register only
210  *          if the reference partition is same with executing core
211  *
212  * @param[in]  pxLcuInit         Pointer to the configuration structure.
213  *
214  * @return Lcu_Ip_ReturnType LCU_IP_STATUS_WRONG_CORE is returned if enable the multi-cores feature and the reference partition is same with executing core.
215  *                           LCU_IP_STATUS_SUCCESS is returned in the remaining cases
216  *
217  * @implements Lcu_Ip_Init_Activity
218  * */
219 Lcu_Ip_ReturnType Lcu_Ip_Init(const Lcu_Ip_InitType * const pxLcuInit);
220 
221 /**
222  * @brief This function De-initializes the Lcu Ip Driver.
223  * @details This service is a non reentrant function that shall De-initialize the Lcu Ip driver.
224  *          When enable multi cores, the API shall write the values into the register only
225  *          if the reference partition is same with executing core
226  *
227  * @return Lcu_Ip_ReturnType LCU_IP_STATUS_WRONG_CORE is returned if enable the multi-cores feature and the reference partition is same with executing core.
228  *                           LCU_IP_STATUS_SUCCESS is returned in the remaining cases
229  *
230  * @implements Lcu_Ip_Deinit_Activity
231  * */
232 Lcu_Ip_ReturnType Lcu_Ip_Deinit(void);
233 
234 /**
235  * @brief [WP] This function Enable Write Protect feature for the Logic Instance.
236  * @details This service is a reentrant function that shall turns on write protection for all LCU
237  *          registers except SWVALUE, LCn_STS, and FORCEST.
238  *
239  * @param[in]  LogicInstance         Specifies the Logic Instance.Using define generated by the
240  *                                   configurator (Example : LCU_LOGIC_INSTANCE_0)
241  *
242  * @return     Lcu_Ip_ReturnType LCU_IP_STATUS_SUCCESS is returned if the write protect was enabled successfully.
243  *                               LCU_IP_STATUS_PROTECTED is returned if the write protect was already enable before
244  *
245  * @implements Lcu_Ip_SetWriteProtect_Activity
246  * */
247 Lcu_Ip_ReturnType Lcu_Ip_SetWriteProtect(const uint8 LogicInstance);
248 
249 /**
250  * @brief [WP] This function get Write Protect status for the Logic Instance
251  * @details This service is a reentrant function that shall return Write Protect Status.
252  *
253  * @param[in]  LogicInstance         Specifies the Logic Instance.Using define generated by the
254  *                                   configurator (Example : LCU_LOGIC_INSTANCE_0)
255  *
256  * @return     Lcu_Ip_ReturnType LCU_IP_STATUS_PROTECTED is returned if the write protect was already enabled before.
257  *                               LCU_IP_STATUS_SUCCESS is returned if the write protect is disabled. In this case user can call Lcu_Ip_SetWriteProtect to enable Write Protect feature.
258  *
259  * @implements Lcu_Ip_GetWriteProtect_Activity
260  * */
261 Lcu_Ip_ReturnType Lcu_Ip_GetWriteProtect(const uint8 LogicInstance);
262 
263 #if (STD_ON == LCU_IP_SYNC_FUNC_IS_AVAILABLE)
264 /* Input configuration */
265 
266 /**
267  * @brief [SWEN] This function Enable/Disable software override of LC input.
268  * @details This service is a reentrant function that shall Enable/Disable software override of LC
269  *          input. When enable multi cores, the API shall write the values into the register only
270  *          if the list contains all the Inputs related to the same partition
271  *
272  *          How to use this interface:
273  *          List[x].LogicInputId -> The Logic Input Id generated by the configurator
274  *          List[x].Value -> Using define generated by the configurator :
275  *          LCU_IP_SW_OVERRIDE_DISABLE/LCU_IP_SW_OVERRIDE_ENABLE
276  *
277  * @param[in]  List         Specifies the input configuration.
278  * @param[in]  Dimension    Number of entries in the List
279  *
280  * @return Lcu_Ip_ReturnType LCU_IP_STATUS_WRONG_CORE is returned if enable the multi-cores feature and at least one Input in the List has the incorrect partition.
281  *                           LCU_IP_STATUS_SUCCESS is returned in the remaining cases
282  *
283  * @implements Lcu_Ip_SetSyncInputSwOverrideEnable_Activity
284  * */
285 Lcu_Ip_ReturnType Lcu_Ip_SetSyncInputSwOverrideEnable(const Lcu_Ip_SyncInputValueType List[], const uint8 Dimension);
286 
287 /**
288  * @brief [SWVALUE] This function specifies the software override value for each LC input.
289  * @details This service is a reentrant function that shall specifies the software override value
290  *          for each LC input. When enable multi cores, the API shall write the values into the
291  *          register only if the list contains all the Inputs related to the same partition
292  *
293  *          How to use this interface:
294  *          List[x].LogicInputId -> The Logic Input Id generated by the configurator
295  *          List[x].Value -> Using define generated by the configurator :
296  *          LCU_IP_SW_OVERRIDE_LOGIC_LOW/LCU_IP_SW_OVERRIDE_LOGIC_HIGH
297  *
298  * @param[in]  List         Specifies the input configuration.
299  * @param[in]  Dimension    Number of entries in the List
300  *
301  * @return Lcu_Ip_ReturnType LCU_IP_STATUS_WRONG_CORE is returned if enable the multi-cores feature and at least one Input in the List has the incorrect partition.
302  *                           LCU_IP_STATUS_SUCCESS is returned in the remaining cases
303  *
304  * @implements Lcu_Ip_SetSyncInputSwOverrideValue_Activity
305  * */
306 Lcu_Ip_ReturnType Lcu_Ip_SetSyncInputSwOverrideValue(const Lcu_Ip_SyncInputValueType List[], const uint8 Dimension);
307 
308 /**
309  * @brief [MUXSEL] This function selects the source of the LC input.
310  * @details This service is a reentrant function that shall selects the source of the LC input
311  *
312  *          How to use this interface:
313  *          List[x].LogicInputId -> The Logic Input Id generated by the configurator
314  *          List[x].Value -> Unsigned Integer: [0, 255]
315  *
316  * @param[in]  List         Specifies the input configuration.
317  * @param[in]  Dimension    Number of entries in the List
318  *
319  * @return Lcu_Ip_ReturnType LCU_IP_STATUS_WRONG_CORE is returned if enable the multi-cores feature and at least one Input in the List has the incorrect partition.
320  *                           LCU_IP_STATUS_SUCCESS is returned in the remaining cases
321  *
322  * @implements Lcu_Ip_SetSyncInputMuxSelect_Activity
323  * */
324 Lcu_Ip_ReturnType Lcu_Ip_SetSyncInputMuxSelect(const Lcu_Ip_SyncInputValueType List[], const uint8 Dimension);
325 
326 /**
327  * @brief [SW_MODE] specifies the software sync mode for the inputs to this LC.
328  * @details This service is a reentrant function that shall specifies the software sync mode for
329  *          the inputs to this LC.When Software Override is enabled (SWEN), these bits control
330  *          whether Software Override Value (SWVALUE) changes occur immediately or on the rising
331  *          edge of the selected sync pulse
332  *
333  *          How to use this interface:
334  *          List[x].LogicInputId -> The Logic Input Id generated by the configurator
335  *          List[x].Value -> Using define generated by the configurator :
336  *          LCU_IP_SW_SYNC_IMMEDIATE/LCU_IP_SW_SYNC_ON_RISING_EDGE
337  *
338  * @param[in]  List         Specifies the input configuration.
339  * @param[in]  Dimension    Number of entries in the List
340  *
341  * @return Lcu_Ip_ReturnType LCU_IP_STATUS_WRONG_CORE is returned if enable the multi-cores feature and at least one Input in the List has the incorrect partition.
342  *                           LCU_IP_STATUS_SUCCESS is returned in the remaining cases
343  *
344  * @implements Lcu_Ip_SetSyncInputSwSyncMode_Activity
345  * */
346 Lcu_Ip_ReturnType Lcu_Ip_SetSyncInputSwSyncMode(const Lcu_Ip_SyncInputValueType List[], const uint8 Dimension);
347 
348 /* Output configuration */
349 
350 /**
351  * @brief [DBGEN] This function Enables/Disables outputs to continue operation in Debug mode.
352  * @details This service is a reentrant function that shall Enables/Disables outputs to continue
353  *          operation in Debug mode. When enable multi cores, the API shall write the values into
354  *          the register only if the list contains all the Outputs related to the same partition
355  *
356  *          How to use this interface:
357  *          List[x].LogicOutputId -> The Logic Output Id generated by the configurator
358  *          List[x].Value -> Using define generated by the configurator :
359  *          LCU_IP_DEBUG_DISABLE/LCU_IP_DEBUG_ENABLE
360  *
361  * @param[in]  List         Specifies the Output configuration.
362  * @param[in]  Dimension    Number of entries in the List
363  *
364  * @return Lcu_Ip_ReturnType LCU_IP_STATUS_WRONG_CORE is returned if enable the multi-cores feature and at least one Output in the List has the incorrect partition.
365  *                           LCU_IP_STATUS_SUCCESS is returned in the remaining cases
366  *
367  * @implements Lcu_Ip_SetSyncOutputDebugMode_Activity
368  * */
369 Lcu_Ip_ReturnType Lcu_Ip_SetSyncOutputDebugMode(const Lcu_Ip_SyncOutputValueType List[], const uint8 Dimension);
370 
371 /**
372  * @brief [OUTEN] This function Enables/Disables LC outputs.
373  * @details This service is a reentrant function that shall Enables/Disables LC outputs. When
374  *          enable multi cores, the API shall write the values into the register only if the list
375  *          contains all the Outputs related to the same partition
376  *
377  *          How to use this interface:
378  *          List[x].LogicOutputId -> The Logic Output Id generated by the configurator
379  *          List[x].Value -> Using define generated by the configurator :
380  *          LCU_IP_OUTPUT_DISABLE/LCU_IP_OUTPUT_ENABLE
381  *
382  * @param[in]  List         Specifies the Output configuration.
383  * @param[in]  Dimension    Number of entries in the List
384  *
385  * @return Lcu_Ip_ReturnType LCU_IP_STATUS_WRONG_CORE is returned if enable the multi-cores feature and at least one Output in the List has the incorrect partition.
386  *                           LCU_IP_STATUS_SUCCESS is returned in the remaining cases
387  *
388  * @implements Lcu_Ip_SetSyncOutputEnable_Activity
389  * */
390 Lcu_Ip_ReturnType Lcu_Ip_SetSyncOutputEnable(const Lcu_Ip_SyncOutputValueType List[], const uint8 Dimension);
391 
392 /**
393  * @brief [FORCE_SENSE] This function specifies which force inputs affect output.
394  * @details This service is a reentrant function that shall specifies which force inputs affect
395  *          output. When enable multi cores, the API shall write the values into the register only
396  *          if the list contains all the Outputs related to the same partition
397  *
398  *          How to use this interface:
399  *          List[x].LogicOutputId -> The Logic Output Id generated by the configurator
400  *          List[x].Value -> Unsigned Integer: [0, 255]
401  *          For each bit:
402  *              0b - Does not affect
403  *              1b - Affects
404 .*          Example: 011b specifies: force inputs 0 and 1 will affect for this logic output,
405 .*          but force inputs 2 will not affect
406  *
407  * @param[in]  List         Specifies the Output configuration.
408  * @param[in]  Dimension    Number of entries in the List
409  *
410  * @return Lcu_Ip_ReturnType LCU_IP_STATUS_WRONG_CORE is returned if enable the multi-cores feature and at least one Output in the List has the incorrect partition.
411  *                           LCU_IP_STATUS_SUCCESS is returned in the remaining cases
412  *
413  * @implements Lcu_Ip_SetSyncOutputForceInputSensitivity_Activity
414  * */
415 Lcu_Ip_ReturnType Lcu_Ip_SetSyncOutputForceInputSensitivity(const Lcu_Ip_SyncOutputValueType List[], const uint8 Dimension);
416 
417 /* [FORCE_MODE] Specifies the timing for clearing force events for output */
418 /**
419  * @brief [FORCE_MODE] This function specifies the timing for clearing force events for output.
420  * @details This service is a reentrant function that shall specifies the timing for clearing
421  *          force events for output. When enable multi cores, the API shall write the values into
422  *          the register only if the list contains all the Outputs related to the same partition
423  *
424  *          How to use this interface:
425  *          List[x].LogicOutputId -> The Logic Output Id generated by the configurator
426  *          List[x].Value -> Using define generated by the configurator :
427  *          LCU_IP_CLEAR_FORCE_SIGNAL_IMMEDIATE/
428  *          LCU_IP_CLEAR_FORCE_SIGNAL_ON_RISING_EDGE/
429  *          LCU_IP_CLEAR_FORCE_SIGNAL_AFTER_CLEAR_STATUS/
430  *          LCU_IP_CLEAR_FORCE_SIGNAL_ON_RISING_EDGE_AFTER_CLEAR_STATUS
431  *
432  * @param[in]  List         Specifies the Output configuration.
433  * @param[in]  Dimension    Number of entries in the List
434  *
435  * @return Lcu_Ip_ReturnType LCU_IP_STATUS_WRONG_CORE is returned if enable the multi-cores feature and at least one Output in the List has the incorrect partition.
436  *                           LCU_IP_STATUS_SUCCESS is returned in the remaining cases
437  *
438  * @implements Lcu_Ip_SetSyncOutputForceClearingMode_Activity
439  * */
440 Lcu_Ip_ReturnType Lcu_Ip_SetSyncOutputForceClearingMode(const Lcu_Ip_SyncOutputValueType List[], const uint8 Dimension);
441 
442 /**
443  * @brief [SYNC_SEL] This function specifies which sync input to use for Force signal.
444  * @details This service is a reentrant function that shall specifies which sync input to use for
445  *          Force signal. When enable multi cores, the API shall write the values into the
446  *          register only if the list contains all the Outputs related to the same partition
447  *
448  *          How to use this interface:
449  *          List[x].LogicOutputId -> The Logic Output Id generated by the configurator
450  *          List[x].Value ->  Unsigned Integer: [0, 255]
451  *                            00b - Sync input 0
452  *                            01b - Sync input 1
453  *
454  * @param[in]  List         Specifies the Output configuration.
455  * @param[in]  Dimension    Number of entries in the List
456  *
457  * @return Lcu_Ip_ReturnType LCU_IP_STATUS_WRONG_CORE is returned if enable the multi-cores feature and at least one Output in the List has the incorrect partition.
458  *                           LCU_IP_STATUS_SUCCESS is returned in the remaining cases
459  *
460  * @implements Lcu_Ip_SetSyncOutputForceSyncSelect_Activity
461  * */
462 Lcu_Ip_ReturnType Lcu_Ip_SetSyncOutputForceSyncSelect(const Lcu_Ip_SyncOutputValueType List[], const uint8 Dimension);
463 
464 /**
465  * @brief [OUTPOL] This function specifies the polarity of the outputs.
466  * @details This service is a reentrant function that shall specifies the polarity of the outputs.
467  *          When enable multi cores, the API shall write the values into the register only if the
468  *          list contains all the Outputs related to the same partition
469  *
470  *          How to use this interface:
471  *          List[x].LogicOutputId -> The Logic Output Id generated by the configurator
472  *          List[x].Value -> Using define generated by the configurator :
473  *          LCU_IP_FORCE_POL_NOT_INVERTED/LCU_IP_FORCE_POL_INVERTED
474  *
475  * @param[in]  List         Specifies the Output configuration.
476  * @param[in]  Dimension    Number of entries in the List
477  *
478  * @return Lcu_Ip_ReturnType LCU_IP_STATUS_WRONG_CORE is returned if enable the multi-cores feature and at least one Output in the List has the incorrect partition.
479  *                           LCU_IP_STATUS_SUCCESS is returned in the remaining cases
480  *
481  * @implements Lcu_Ip_SetSyncOutputPolarity_Activity
482  * */
483 Lcu_Ip_ReturnType Lcu_Ip_SetSyncOutputPolarity(const Lcu_Ip_SyncOutputValueType List[], const uint8 Dimension);
484 
485 /**
486  * @brief [FORCE_DMA_EN] This function Enables/Disable the generation of a DMA request when a
487  *          force event occurs.
488  * @details This service is a reentrant function that shall Enables/Disable the generation of a
489  *          DMA request when a force event occurs. When enable multi cores, the API shall write
490  *          the values into the register only if the list contains all the Outputs related to the
491  *          same partition
492  *
493  *          How to use this interface:
494  *          List[x].LogicOutputId -> The Logic Output Id generated by the configurator
495  *          List[x].Value -> Using define generated by the configurator :
496  *          LCU_IP_DMA_DISABLE/LCU_IP_DMA_ENABLE
497  *
498  * @param[in]  List         Specifies the Output configuration.
499  * @param[in]  Dimension    Number of entries in the List
500  *
501  * @return Lcu_Ip_ReturnType LCU_IP_STATUS_WRONG_CORE is returned if enable the multi-cores feature and at least one Output in the List has the incorrect partition.
502  *                           LCU_IP_STATUS_SUCCESS is returned in the remaining cases
503  *
504  * @implements Lcu_Ip_SetSyncOutputForceDma_Activity
505  * */
506 Lcu_Ip_ReturnType Lcu_Ip_SetSyncOutputForceDma(const Lcu_Ip_SyncOutputValueType List[], const uint8 Dimension);
507 
508 /**
509  * @brief [FORCE_INT_EN] This function Enables/Disable the generation of an interrupt request when
510  *          force event occurs.
511  * @details This service is a reentrant function that shall Enables/Disable the generation of an
512  *          interrupt request when force event occurs. When enable multi cores, the API shall
513  *          write the values into the register only if the list contains all the Outputs related
514  *          to the same partition
515  *
516  *          How to use this interface:
517  *          List[x].LogicOutputId -> The Logic Output Id generated by the configurator
518  *          List[x].Value -> Using define generated by the configurator :
519  *          LCU_IP_INT_DISABLE/LCU_IP_INT_ENABLE
520  *
521  * @param[in]  List         Specifies the Output configuration.
522  * @param[in]  Dimension    Number of entries in the List
523  *
524  * @return Lcu_Ip_ReturnType LCU_IP_STATUS_WRONG_CORE is returned if enable the multi-cores feature and at least one Output in the List has the incorrect partition.
525  *                           LCU_IP_STATUS_SUCCESS is returned in the remaining cases
526  *
527  * @implements Lcu_Ip_SetSyncOutputForceInt_Activity
528  * */
529 Lcu_Ip_ReturnType Lcu_Ip_SetSyncOutputForceInt(const Lcu_Ip_SyncOutputValueType List[], const uint8 Dimension);
530 
531 /**
532  * @brief [LUT_DMA_EN] This function Enables/Disable the generation of a DMA request when a
533  *          LUT event occurs.
534  * @details This service is a reentrant function that shall Enables/Disable the generation of a
535  *          DMA request when a LUT event occurs. When enable multi cores, the API shall write the
536  *          values into the register only if the list contains all the Outputs related to the same
537  *          partition
538  *
539  *          How to use this interface:
540  *          List[x].LogicOutputId -> The Logic Output Id generated by the configurator
541  *          List[x].Value -> Using define generated by the configurator :
542  *          LCU_IP_DMA_DISABLE/LCU_IP_DMA_ENABLE
543  *
544  * @param[in]  List         Specifies the Output configuration.
545  * @param[in]  Dimension    Number of entries in the List
546  *
547  * @return Lcu_Ip_ReturnType LCU_IP_STATUS_WRONG_CORE is returned if enable the multi-cores feature and at least one Output in the List has the incorrect partition.
548  *                           LCU_IP_STATUS_SUCCESS is returned in the remaining cases
549  *
550  * @implements Lcu_Ip_SetSyncOutputLutDma_Activity
551  * */
552 Lcu_Ip_ReturnType Lcu_Ip_SetSyncOutputLutDma(const Lcu_Ip_SyncOutputValueType List[], const uint8 Dimension);
553 
554 /**
555  * @brief [LUT_INT_EN] This function Enables/Disable the generation of an interrupt request when
556  *          LUT event occurs.
557  * @details This service is a reentrant function that shall Enables/Disable the generation of an
558  *          interrupt request when LUT event occurs. When enable multi cores, the API shall write
559  *          the values into the register only if the list contains all the Outputs related to the
560  *          same partition
561  *
562  *          How to use this interface:
563  *          List[x].LogicOutputId -> The Logic Output Id generated by the configurator
564  *          List[x].Value -> Using define generated by the configurator :
565  *          LCU_IP_INT_DISABLE/LCU_IP_INT_ENABLE
566  *
567  * @param[in]  List         Specifies the Output configuration.
568  * @param[in]  Dimension    Number of entries in the List
569  *
570  * @return Lcu_Ip_ReturnType LCU_IP_STATUS_WRONG_CORE is returned if enable the multi-cores feature and at least one Output in the List has the incorrect partition.
571  *                           LCU_IP_STATUS_SUCCESS is returned in the remaining cases
572  *
573  * @implements Lcu_Ip_SetSyncOutputLutInt_Activity
574  * */
575 Lcu_Ip_ReturnType Lcu_Ip_SetSyncOutputLutInt(const Lcu_Ip_SyncOutputValueType List[], const uint8 Dimension);
576 
577 /**
578  * @brief [LUT_FALL_FILT] This function specifies the number of consecutive clock cycles the
579  *          filter output must be logic 0 before the output signal goes low
580  * @details This service is a reentrant function that shall specifies the number of consecutive
581  *          clock cycles the filter output must be logic 0 before the output signal goes low
582  *          When enable multi cores, the API shall write the values into the register only if the
583  *          list contains all the Outputs related to the same partition
584  *
585  *          How to use this interface:
586  *          List[x].LogicOutputId -> The Logic Output Id generated by the configurator
587  *          List[x].Value -> Unsigned Integer: [0, 65535]
588  *
589  * @param[in]  List         Specifies the Output configuration.
590  * @param[in]  Dimension    Number of entries in the List
591  *
592  * @return Lcu_Ip_ReturnType LCU_IP_STATUS_WRONG_CORE is returned if enable the multi-cores feature and at least one Output in the List has the incorrect partition.
593  *                           LCU_IP_STATUS_SUCCESS is returned in the remaining cases
594  *
595  * @implements Lcu_Ip_SetSyncOutputFallFilter_Activity
596  * */
597 Lcu_Ip_ReturnType Lcu_Ip_SetSyncOutputFallFilter(const Lcu_Ip_SyncOutputValueType List[], const uint8 Dimension);
598 
599 /**
600  * @brief [LUT_RISE_FILT] This function specifies the number of consecutive clock cycles the
601  *          filter output must be logic 1 before the output signal goes high
602  * @details This service is a reentrant function that shall Specifies the number of consecutive
603  *          clock cycles the filter output must be logic 1 before the output signal goes high
604  *          When enable multi cores, the API shall write the values into the register only if the
605  *          list contains all the Outputs related to the same partition
606  *
607  *          How to use this interface:
608  *          List[x].LogicOutputId -> The Logic Output Id generated by the configurator
609  *          List[x].Value -> Unsigned Integer: [0, 65535]
610  *
611  * @param[in]  List         Specifies the Output configuration.
612  * @param[in]  Dimension    Number of entries in the List
613  *
614  * @return Lcu_Ip_ReturnType LCU_IP_STATUS_WRONG_CORE is returned if enable the multi-cores feature and at least one Output in the List has the incorrect partition.
615  *                           LCU_IP_STATUS_SUCCESS is returned in the remaining cases
616  *
617  * @implements Lcu_Ip_SetSyncOutputRiseFilter_Activity
618  * */
619 Lcu_Ip_ReturnType Lcu_Ip_SetSyncOutputRiseFilter(const Lcu_Ip_SyncOutputValueType List[], const uint8 Dimension);
620 
621 /**
622  * @brief [LUTCTRL] This function specifies the LUT positions, based on the combined LC input value
623  * @details This service is a reentrant function that shall Specifies the LUT positions, based on
624  *          the combined LC input value.
625  *          When enable multi cores, the API shall write the values into the register only if the
626  *          list contains all the Outputs related to the same partition
627  *
628  *          How to use this interface:
629  *          List[x].LogicOutputId -> The Logic Output Id generated by the configurator
630  *          List[x].Value -> Unsigned Integer: [0, 65535]
631  *
632  * @param[in]  List         Specifies the Output configuration.
633  * @param[in]  Dimension    Number of entries in the List
634  *
635  * @return Lcu_Ip_ReturnType LCU_IP_STATUS_WRONG_CORE is returned if enable the multi-cores feature and at least one Output in the List has the incorrect partition.
636  *                           LCU_IP_STATUS_SUCCESS is returned in the remaining cases
637  *
638  * @implements Lcu_Ip_SetSyncOutputLutControl_Activity
639  * */
640 Lcu_Ip_ReturnType Lcu_Ip_SetSyncOutputLutControl(const Lcu_Ip_SyncOutputValueType List[], const uint8 Dimension);
641 
642 /**
643  * @brief [FORCESTS] This function Clear Force Event
644  * @details This service is a reentrant function that shall Clear Force Event
645  *          When enable multi cores, the API shall write the values into the register only if the
646  *          list contains all the Outputs related to the same partition
647  *
648  *          How to use this interface:
649  *          List[x].LogicOutputId -> The Logic Output Id generated by the configurator
650  *
651  * @param[in]  List         Specifies the Output configuration.
652  * @param[in]  Dimension    Number of entries in the List
653  *
654  * @return Lcu_Ip_ReturnType LCU_IP_STATUS_WRONG_CORE is returned if enable the multi-cores feature and at least one Output in the List has the incorrect partition.
655  *                           LCU_IP_STATUS_SUCCESS is returned in the remaining cases
656  *
657  * @implements Lcu_Ip_ClearSyncOutputForceEvent_Activity
658  * */
659 Lcu_Ip_ReturnType Lcu_Ip_ClearSyncOutputForceEvent(const Lcu_Ip_SyncOutputValueType List[], const uint8 Dimension);
660 
661 /**
662  * @brief [LC_INPUTS] This function Indicates states of LC inputs
663  * @details This service is a reentrant function that shall Indicates states of LC inputs
664  *          When enable multi cores, the API shall get the values from the register only if the
665  *          list contains all the Inputs related to the same partition
666  *
667  *          How to use this interface:
668  *          [in] List[x].LogicInputId -> The Logic Input Id generated by the
669  *               configurator
670  *          [out] List[x].Value -> Store the states of LC inputs
671  *
672  * @param[in/out]  List    Pointer to the configuration structure
673  * @param[in]      Dimension            Number of entries in the List
674  *
675  * @return Lcu_Ip_ReturnType LCU_IP_STATUS_WRONG_CORE is returned if enable the multi-cores feature and at least one Output in the List has the incorrect partition.
676  *                           LCU_IP_STATUS_SUCCESS is returned in the remaining cases
677  *
678  * @implements Lcu_Ip_GetSyncLogicInput_Activity
679  * */
680 Lcu_Ip_ReturnType Lcu_Ip_GetSyncLogicInput(Lcu_Ip_SyncInputValueType List[], const uint8 Dimension);
681 
682 /**
683  * @brief [SWOUT] This function Indicates states of LC inputs or software-overridden inputs
684  * @details This service is a reentrant function that shall Indicates states of LC inputs or
685  *          software-overridden inputs
686  *          When enable multi cores, the API shall get the values from the register only if the
687  *          list contains all the Inputs related to the same partition
688  *
689  *          How to use this interface:
690  *          [in] List[x].LogicInputId -> The Logic Input Id generated by the
691  *               configurator
692  *          [out] List[x].Value -> Store the states of LC inputs or
693  *                                              software-overridden inputs
694  *
695  * @param[in/out]  List    Pointer to the configuration structure
696  * @param[in]      Dimension            Number of entries in the List
697  *
698  * @return Lcu_Ip_ReturnType LCU_IP_STATUS_WRONG_CORE is returned if enable the multi-cores feature and at least one Output in the List has the incorrect partition.
699  *                           LCU_IP_STATUS_SUCCESS is returned in the remaining cases
700  *
701  * @implements Lcu_Ip_GetSyncSwOverrideInput_Activity
702  * */
703 Lcu_Ip_ReturnType Lcu_Ip_GetSyncSwOverrideInput(Lcu_Ip_SyncInputValueType List[], const uint8 Dimension);
704 
705 /**
706  * @brief [LCOUT] This function Indicates states of LC outputs
707  * @details This service is a reentrant function that shall Indicates states of LC outputs
708  *          When enable multi cores, the API shall get the values from the register only if the
709  *          list contains all the Outputs related to the same partition
710  *
711  *          How to use this interface:
712  *          [in] List[x].LogicOutputId -> The Logic Output Id generated by the
713  *               configurator
714  *          [out] List[x].Value -> Store the states of LC outputs
715  *
716  * @param[in/out]  List    Pointer to the configuration structure
717  * @param[in]      Dimension            Number of entries in the List
718  *
719  * @return Lcu_Ip_ReturnType LCU_IP_STATUS_WRONG_CORE is returned if enable the multi-cores feature and at least one Output in the List has the incorrect partition.
720  *                           LCU_IP_STATUS_SUCCESS is returned in the remaining cases
721  *
722  * @implements Lcu_Ip_GetSyncLogicOutput_Activity
723  * */
724 Lcu_Ip_ReturnType Lcu_Ip_GetSyncLogicOutput(Lcu_Ip_SyncOutputValueType List[], const uint8 Dimension);
725 
726 /**
727  * @brief [FORCEOUT] This function Indicates the current state of force outputs for the logic
728  *                   outputs
729  * @details This service is a reentrant function that shall the current state of force outputs for
730  *          the logic outputs
731  *          When enable multi cores, the API shall get the values from the register only if the
732  *          list contains all the Outputs related to the same partition
733  *
734  *          How to use this interface:
735  *          [in] List[x].LogicOutputId -> The Logic Output Id generated by the
736  *               configurator
737  *          [out] List[x].Value -> Store the current state of force outputs for the
738  *                logic outputs
739  *
740  * @param[in/out]  List    Pointer to the configuration structure
741  * @param[in]      Dimension            Number of entries in the List
742  *
743  * @return Lcu_Ip_ReturnType LCU_IP_STATUS_WRONG_CORE is returned if enable the multi-cores feature and at least one Output in the List has the incorrect partition.
744  *                           LCU_IP_STATUS_SUCCESS is returned in the remaining cases
745  *
746  * @implements Lcu_Ip_GetSyncForceOutput_Activity
747  * */
748 Lcu_Ip_ReturnType Lcu_Ip_GetSyncForceOutput(Lcu_Ip_SyncOutputValueType List[], const uint8 Dimension);
749 
750 /**
751  * @brief [FORCESTS] This function Indicates that a force event has occurred on the associated
752           output
753  * @details This service is a reentrant function that shall Indicates that a force event has
754  *          occurred on the associated output
755  *          When enable multi cores, the API shall get the values from the register only if the
756  *          list contains all the Outputs related to the same partition
757  *
758  *          How to use this interface:
759  *          [in] List[x].LogicOutputId -> The Logic Output Id generated by the
760  *               configurator
761  *          [out] List[x].Value -> Store the force event value.
762  *                Value = 0: force event not occurs
763  *                Value = 1: force event occurs
764  *
765  * @param[in/out]  List    Pointer to the configuration structure
766  * @param[in]      Dimension            Number of entries in the List
767  *
768  * @return Lcu_Ip_ReturnType LCU_IP_STATUS_WRONG_CORE is returned if enable the multi-cores feature and at least one Output in the List has the incorrect partition.
769  *                           LCU_IP_STATUS_SUCCESS is returned in the remaining cases
770  *
771  * @implements Lcu_Ip_GetSyncForceStatus_Activity
772  * */
773 Lcu_Ip_ReturnType Lcu_Ip_GetSyncForceStatus(Lcu_Ip_SyncOutputValueType List[], const uint8 Dimension);
774 
775 /**
776  * @brief [COMB_FORCE] This function Indicates the combined value of force inputs to each output
777  * @details This service is a reentrant function that shall Indicates the combined value of force
778  *          inputs to each output
779  *          When enable multi cores, the API shall get the values from the register only if the
780  *          list contains all the Outputs related to the same partition
781  *
782  *          How to use this interface:
783  *          [in] List[x].LogicOutputId -> The Logic Output Id generated by the
784  *               configurator
785  *          [out] List[x].Value -> Store the combined value of force inputs to each
786  *                output
787  *
788  * @param[in/out]  List    Pointer to the configuration structure
789  * @param[in]      Dimension            Number of entries in the List
790  *
791  * @return Lcu_Ip_ReturnType LCU_IP_STATUS_WRONG_CORE is returned if enable the multi-cores feature and at least one Output in the List has the incorrect partition.
792  *                           LCU_IP_STATUS_SUCCESS is returned in the remaining cases
793  *
794  * @implements Lcu_Ip_GetSyncCombineForceInput_Activity
795  * */
796 Lcu_Ip_ReturnType Lcu_Ip_GetSyncCombineForceInput(Lcu_Ip_SyncOutputValueType List[], const uint8 Dimension);
797 #endif /* #if (STD_ON == LCU_IP_SYNC_FUNC_IS_AVAILABLE) */
798 
799 #if (STD_ON == LCU_IP_ASYNC_FUNC_IS_AVAILABLE)
800 
801 /**
802  * @brief This function configure multiple configuration for one logic input
803  * @details This service is a reentrant function that shall configure multiple configuration for
804  *          one logic input
805  *
806  *          How to use this interface:
807  *          List[x].Param -> Select member of Lcu_Ip_InputParamType
808  *          List[x].Value -> Unsigned Integer: [0, 255] or some defines generated by configurator
809  *                           base on Param
810  *
811  * @param[in]  LogicInput    Logic input Id
812  * @param[in]  List          List of param and value
813  * @param[in]  Dimension     Number of entries in the List
814  *
815  * @return Lcu_Ip_ReturnType LCU_IP_STATUS_WRONG_CORE is returned if enable the multi-cores feature and the LogicInput incorrect partition.
816  *                           LCU_IP_STATUS_SUCCESS is returned in the remaining cases
817  *
818  * @implements Lcu_Ip_SetAsyncInputList_Activity
819  * */
820 Lcu_Ip_ReturnType Lcu_Ip_SetAsyncInputList(const uint8 LogicInput, const Lcu_Ip_AsyncInputValueType List[], const uint8 Dimension);
821 
822 /**
823  * @brief This function configure multiple configuration for one logic output
824  * @details This service is a reentrant function that shall configure multiple configuration for
825  *          one logic output
826  *
827  *          How to use this interface:
828  *          List[x].Param -> Select member of Lcu_Ip_InputParamType
829  *          List[x].Value -> Unsigned Integer: [0, 255] or some defines generated by configurator
830  *                           base on Param
831  *
832  * @param[in]  LogicOutput    Logic output Id
833  * @param[in]  List           List of param and value
834  * @param[in]  Dimension      Number of entries in the List
835  *
836  * @return Lcu_Ip_ReturnType LCU_IP_STATUS_WRONG_CORE is returned if enable the multi-cores feature and the LogicInput incorrect partition.
837  *                           LCU_IP_STATUS_SUCCESS is returned in the remaining cases
838  *
839  * @implements Lcu_Ip_SetAsyncOutputList_Activity
840  * */
841 Lcu_Ip_ReturnType Lcu_Ip_SetAsyncOutputList(const uint8 LogicOutput, const Lcu_Ip_AsyncOutputValueType List[], const uint8 Dimension);
842 
843 /**
844  * @brief This function get information of Logic Input
845  * @details This service is a reentrant function that shall get states of Logic Inputs
846  *          How to use this interface:
847  *          [in] LogicInput -> The Logic Input Name generated by the configurator.
848  *                             By default: LCU_LOGIC_INPUT_0, LCU_LOGIC_INPUT_1,...
849  *          [in] Param -> Select parameter. Example: LCU_IP_INPUT_GET_LOGIC_INPUT_STATE
850  *          [out] Value -> Store the states of LC inputs
851  *
852  * @param[in]  LogicInput    The Logic Input Name
853  * @param[in]  Param         Selection parameter
854  * @param[out] Value         Output value
855  *
856  * @return void
857  *
858  *
859  * @implements Lcu_Ip_GetAsyncLogicInputInfo_Activity
860  * */
861 Lcu_Ip_ReturnType Lcu_Ip_GetAsyncLogicInputInfo(const uint8 LogicInput, const Lcu_Ip_LogicInputInfoParamType Param, uint8 * const Value);
862 
863 /**
864  * @brief This function get information of Logic Output
865  * @details This service is a reentrant function that shall get states of Logic Outputs
866  *          How to use this interface:
867  *          [in] LogicOutput -> The Logic Output Name generated by the configurator.
868  *                              By default: LCU_LOGIC_OUTPUT_0, LCU_LOGIC_OUTPUT_1,...
869  *          [in] Param -> Select parameter. Example: LCU_IP_OUTPUT_GET_LOGIC_OUTPUT_STATE
870  *          [out] Value -> Store the states of LC inputs
871  *
872  * @param[in]  LogicOutput    The Logic Output Name
873  * @param[in]  Param          Selection parameter
874  * @param[out] Value          Output value
875  *
876  * @return void
877  *
878  *
879  * @implements Lcu_Ip_GetAsyncLogicOutputInfo_Activity
880  * */
881 Lcu_Ip_ReturnType Lcu_Ip_GetAsyncLogicOutputInfo(const uint8 LogicOutput, const Lcu_Ip_LogicOutputInfoParamType Param, uint8 * const Value);
882 
883 #endif /* #if (STD_ON == LCU_IP_ASYNC_FUNC_IS_AVAILABLE) */
884 
885 #define MCL_STOP_SEC_CODE
886 #include "Mcl_MemMap.h"
887 
888 #endif /* #if (STD_ON == LCU_IP_IS_AVAILABLE) */
889 
890 #ifdef __cplusplus
891 }
892 #endif
893 
894 /** @} */
895 
896 #endif  /* #ifndef LCU_IP_DRIVER_H_ */
897 
898 /*==================================================================================================
899  *                                        END OF FILE
900 ==================================================================================================*/
901