/* When GPIO is in output mode, puts the corresponding GPO in High (1) or Low (0) level.  */
int32_t MFXSTM32L152_IO_WritePin(MFXSTM32L152_Object_t *pObj, uint32_t IO_Pin, uint8_t PinState)
/* When GPIO is in output mode, puts the corresponding GPO in High (1) or Low (0) level.  */
int32_t MFXSTM32L152_IO_WritePin(MFXSTM32L152_Object_t *pObj, uint32_t IO_Pin, uint8_t PinState)
{
  int32_t ret = MFXSTM32L152_OK;
  if (PinState != 0U)
  {
    if (MFXSTM32L152_reg24_setPinValue(pObj, MFXSTM32L152_REG_ADR_GPO_SET1, IO_Pin, 1) != MFXSTM32L152_OK)
    {
      ret = MFXSTM32L152_ERROR;
    }
  }
  else
  {
    if (MFXSTM32L152_reg24_setPinValue(pObj, MFXSTM32L152_REG_ADR_GPO_CLR1, IO_Pin, 1) != MFXSTM32L152_OK)
    {
      ret = MFXSTM32L152_ERROR;
    }
  }
  return ret;
}