/*!
* @file     Ocu_Ipw.h
*
* @version  1.0.0
*
* @brief    The header of Ocu Ipw API.
*           This header file includes the Ocu Ipw API of the Ocu moudle.
* @attention
*
* Project Name      : AUTOSAR MCAL
*
* Platform          : Arm
*
* Autosar Standard  : Classic Platform 4.4.0
*
* Compiled Version  : G32A10xx_MCAL_1_0_0_15-Nov-2
*
* Copyright (C) 2026 Geehy Semiconductor
*
* You may not use this file except in compliance with the
* GEEHY COPYRIGHT NOTICE (Geehy Semiconductor Software License Agreement).
*
* The program is only for reference, which is distributed in the hope
* that it will be usefull and instructional for customers to develop
* their software. Unless required by applicable law or agreed to in
* writing, the program is distributed on an "AS IS" BASIS, WITHOUT
* ANY WARRANTY OR CONDITIONS OF ANY KIND, either express or implied.
* See the Geehy Semiconductor Software License Agreement for the governing permissions
* and limitations under the License.
*/

#ifndef OCU_IPW_H
#define OCU_IPW_H

#ifdef __cplusplus
extern "C"{
#endif  /* ifdef __cplusplus */
/** @addtogroup G32A10xx_StdPeriphDriver
  @{
*/

/** @defgroup OCU_Driver
  * @brief OCU driver modules
  @{
*/

/** @defgroup OCU_Macros
  @{
*/
/***********************************************************************************************************************
                                    VENDOR ID & AUTOSAR VERSION INFO
***********************************************************************************************************************/
/** Vendor ID (vendorId) of the dedicated implementation of this module according to the AUTOSAR vendor list. */
#define OCU_IPW_H_VENDOR_ID                                0x00C1U
/** Module ID of this module, as defined in the BSW Module List. */
#define OCU_IPW_H_MODULE_ID                                0x007DU
/** Major version number of AUTOSAR release on which the appropriate implementation is based on. */ 
#define OCU_IPW_H_AR_RELEASE_MAJOR_VERSION                 0x04U
/** Minor version number of AUTOSAR release on which the appropriate implementation is based on. */
#define OCU_IPW_H_AR_RELEASE_MINOR_VERSION                 0x04U
/** Revision version number of AUTOSAR release on which the appropriate implementation is based on. */
#define OCU_IPW_H_AR_RELEASE_REVISION_VERSION              0x00U
/** Major version number of the vendor specific implementation of the module. The numbering is vendor specific. */ 
#define OCU_IPW_H_SW_MAJOR_VERSION                         0x01U
/** Minor version number of the vendor specific implementation of the module. The numbering is vendor specific. */
#define OCU_IPW_H_SW_MINOR_VERSION                         0x00U
/** Patch level version number of the vendor specific implementation of the module. The numbering is vendor specific. */
#define OCU_IPW_H_SW_PATCH_VERSION                         0x00U
/**@} end of group OCU_Macros */
/***********************************************************************************************************
                                        FUNCTION DECLARATION
************************************************************************************************************/
/** @defgroup OCU_Fuctions
  @{
*/
#define OCU_START_SEC_CODE
#include "Ocu_MemMap.h"

FUNC (void, OCU_CODE) Ocu_Ipw_Init(CONSTP2CONST(Ocu_HwConfigType, AUTOMATIC, OCU_APPL_CONST) OcuHwConfigurationPtr);

#if (STD_ON == OCU_SET_PIN_ACTION_API)
FUNC(void, OCU_CODE) Ocu_Ipw_SetPinAction(VAR(Ocu_ChannelType,   AUTOMATIC) OcuChannelNumber,\
    VAR(Ocu_PinActionType, AUTOMATIC) OcuPinAction,\
    VAR(boolean,           AUTOMATIC) ChannelIsRunning);
#endif /* {if (STD_ON == OCU_SET_PIN_ACTION_API)} */

#if (STD_ON == OCU_SET_ABSOLUTE_THRESHOLD_API)
FUNC (Ocu_ReturnType, OCU_CODE) Ocu_Ipw_SetAbsThrd(VAR(Ocu_ChannelType, AUTOMATIC) OcuChannelNumber,\
    VAR(Ocu_ValueType,     AUTOMATIC) ReferenceCompareValue,\
    VAR(Ocu_ValueType,     AUTOMATIC) AbsoluteCompareValue);
#endif /* OCU_SET_ABSOLUTE_THRESHOLD_API*/

#if (STD_ON == OCU_SET_PIN_STATE_API)
FUNC (void, OCU_CODE) Ocu_Ipw_SetPinState(VAR(Ocu_ChannelType,  AUTOMATIC) OcuChannelNumber, \
    VAR(Ocu_PinStateType, AUTOMATIC) OcuPinState);
#endif /* {if (STD_ON == OCU_SET_PIN_STATE_API)} */

#if (STD_ON == OCU_SET_RELATIVE_THRESHOLD_API) 
FUNC (Ocu_ReturnType, OCU_CODE) Ocu_Ipw_SetRelThrd(VAR(Ocu_ChannelType,   AUTOMATIC) OcuChannelNumber,\
    VAR(Ocu_ValueType,     AUTOMATIC) RelativeCompareValue);
#endif /* {if (STD_ON == OCU_SET_RELATIVE_THRESHOLD_API)} */

#if (STD_ON == OCU_SET_CLOCK_MODE_API_ENABLE)
FUNC (void, OCU_CODE) Ocu_Ipw_SetClkPsc(CONSTP2CONST(Ocu_HwConfigType, AUTOMATIC, OCU_APPL_CONST) OcuHwConfigurationPtr,\
    VAR(Ocu_TmrPrescalerType,   AUTOMATIC) OcuPrescalerType
);
#endif  /* {if (STD_ON == OCU_SET_CLOCK_MODE_API_ENABLE)} */

FUNC (void, OCU_CODE) Ocu_Ipw_StartCh(VAR(Ocu_ChannelType,  AUTOMATIC) OcuChannelNumber);  

#if (STD_ON == OCU_GET_COUNTER_API)
FUNC (Ocu_ValueType, OCU_CODE) Ocu_Ipw_GetCnt(VAR(Ocu_ChannelType,  AUTOMATIC) OcuChannelNumber);
#endif /* {if (STD_ON == OCU_GET_COUNTER_API)} */

#if ((STD_ON == OCU_SET_RELATIVE_THRESHOLD_API) || (STD_ON == OCU_SET_ABSOLUTE_THRESHOLD_API))
FUNC (Ocu_ValueType, OCU_CODE) Ocu_Ipw_GetMaxCntVal(VAR(Ocu_ChannelType,   AUTOMATIC) ChannelNumber);
#endif  /* {if ((STD_ON == OCU_SET_RELATIVE_THRESHOLD_API) || (STD_ON == OCU_SET_ABSOLUTE_THRESHOLD_API))} */

FUNC (void, OCU_CODE) Ocu_Ipw_StopCh(VAR(Ocu_ChannelType,  AUTOMATIC) OcuChannelNumber); 

#if (STD_ON == OCU_DEINIT_API_ENABLE)
FUNC (void, OCU_CODE) Ocu_Ipw_DeInit(CONSTP2CONST(Ocu_HwConfigType, AUTOMATIC, OCU_APPL_CONST) OcuHwConfigurationPtr);
#endif /* {if (STD_ON == OCU_DEINIT_API_ENABLE)} */

#define OCU_STOP_SEC_CODE
#include "Ocu_MemMap.h"
/**@} end of group OCU_Fuctions */
#ifdef __cplusplus
}
#endif  /* ifdef __cplusplus */

#endif /* OCU_IPW_H */
/**@} end of group OCU_Driver */
/**@} end of group G32A10xx_StdPeriphDriver */
