/* Initialize the mfxstm32l152 and configure the needed hardware resources.  */
int32_t MFXSTM32L152_Init(MFXSTM32L152_Object_t *pObj)
/* Initialize the mfxstm32l152 and configure the needed hardware resources.  */
int32_t MFXSTM32L152_Init(MFXSTM32L152_Object_t *pObj)
{
  int32_t ret = MFXSTM32L152_OK;
  if (pObj->IsInitialized == 0U)
  {
    pObj->IO.Init();
    if (MFXSTM32L152_SetIrqOutPinPolarity(pObj, MFXSTM32L152_OUT_PIN_POLARITY_HIGH) != MFXSTM32L152_OK)
    {
      ret = MFXSTM32L152_ERROR;
    }
    else if (MFXSTM32L152_SetIrqOutPinType(pObj, MFXSTM32L152_OUT_PIN_TYPE_PUSHPULL) != MFXSTM32L152_OK)
    {
      ret = MFXSTM32L152_ERROR;
    }
    else
    {
      pObj->IsInitialized = 1U;
    }
  }
  return ret;
}