libraries/hshcal001.c
int32_t HSHCAL001_HUM_Disable(HSHCAL001_Object_t *pObj)
{
  /* Check if the component is already disabled */
  if (pObj->hum_is_enabled == 0U)
  {
    return HSHCAL001_OK;
  }

  /* Check if the HSHCAL001 temperature sensor is still enable. */
  /* If yes, skip the disable function, if not call disable function */
  if (pObj->temp_is_enabled == 0U)
  {
    /* Power off the component. */
    if (hshcal001_power_on_set(&(pObj->Ctx), PROPERTY_DISABLE) != HSHCAL001_OK)
    {
      return HSHCAL001_ERROR;
    }
  }

  pObj->hum_is_enabled = 0;

  return HSHCAL001_OK;
}
/**
 * @brief  Disable the HSHCAL001 humidity sensor
 * @param  pObj the device pObj
 * @retval 0 in case of success, an error code otherwise
 */
@brief  Disable the HSHCAL001 humidity sensor
@param  pObj the device pObj
@retval 0 in case of success, an error code otherwise
@brief Disable the HSHCAL001 humidity sensor @param pObj the device pObj @retval 0 in case of success an error code otherwise
int32_t HSHCAL001_HUM_Disable(HSHCAL001_Object_t *pObj)
{
  if (pObj->hum_is_enabled == 0U)
  {
    return HSHCAL001_OK;
  }
  if (pObj->temp_is_enabled == 0U)
  {
    if (hshcal001_power_on_set(&(pObj->Ctx), PROPERTY_DISABLE) != HSHCAL001_OK)
    {
      return HSHCAL001_ERROR;
    }
  }
  pObj->hum_is_enabled = 0;
  return HSHCAL001_OK;
}
int32_t HSHCAL001_HUM_Disable ( HSHCAL001_Object_t * pObj ) { if ( pObj -> hum_is_enabled == 0U ) { return HSHCAL001_OK ; } if ( pObj -> temp_is_enabled == 0U ) { if ( hshcal001_power_on_set ( & ( pObj -> Ctx ) , PROPERTY_DISABLE ) != HSHCAL001_OK ) { return HSHCAL001_ERROR ; } } pObj -> hum_is_enabled = 0 ; return HSHCAL001_OK ; }
@brief  Disable the HSHCAL001 humidity sensor
 @param  pObj the device pObj
 @retval 0 in case of success, an error code otherwise
@brief Disable the HSHCAL001 humidity sensor @param pObj the device pObj @retval 0 in case of success an error code otherwise
/* Check if the component is already disabled */ /* Check if the HSHCAL001 temperature sensor is still enable. */ /* If yes, skip the disable function, if not call disable function */ /* Power off the component. */