libraries/hshcal001.c
static int32_t HSHCAL001_SetOutputDataRate(HSHCAL001_Object_t *pObj, float Odr)
{
  hshcal001_odr_t new_odr;

  new_odr = (Odr <= 1.0f) ? HSHCAL001_ODR_1Hz
            : (Odr <= 5.0f) ? HSHCAL001_ODR_5Hz
            : (Odr <= 10.f) ?  HSHCAL001_ODR_10Hz
	          :                  HSHCAL001_ODR_50Hz;

  if (hshcal001_data_rate_set(&(pObj->Ctx), new_odr) != HSHCAL001_OK)
  {
    return HSHCAL001_ERROR;
  }

  return HSHCAL001_OK;
}
/**
 * @brief  Set output data rate
 * @param  pObj the device pObj
 * @param  Odr the output data rate value to be set
 * @retval 0 in case of success, an error code otherwise
 */
@brief  Set output data rate
@param  pObj the device pObj
@param  Odr the output data rate value to be set
@retval 0 in case of success, an error code otherwise
@brief Set output data rate @param pObj the device pObj @param Odr the output data rate value to be set @retval 0 in case of success an error code otherwise
static int32_t HSHCAL001_SetOutputDataRate(HSHCAL001_Object_t *pObj, float Odr)
{
  hshcal001_odr_t new_odr;
  new_odr = (Odr <= 1.0f) ? HSHCAL001_ODR_1Hz
            : (Odr <= 5.0f) ? HSHCAL001_ODR_5Hz
            : (Odr <= 10.f) ?  HSHCAL001_ODR_10Hz
	          :                  HSHCAL001_ODR_50Hz;
  if (hshcal001_data_rate_set(&(pObj->Ctx), new_odr) != HSHCAL001_OK)
  {
    return HSHCAL001_ERROR;
  }
  return HSHCAL001_OK;
}
static int32_t HSHCAL001_SetOutputDataRate ( HSHCAL001_Object_t * pObj , float Odr ) { hshcal001_odr_t new_odr ; new_odr = ( Odr <= 1.0f ) ? HSHCAL001_ODR_1Hz : ( Odr <= 5.0f ) ? HSHCAL001_ODR_5Hz : ( Odr <= 10.f ) ? HSHCAL001_ODR_10Hz : HSHCAL001_ODR_50Hz ; if ( hshcal001_data_rate_set ( & ( pObj -> Ctx ) , new_odr ) != HSHCAL001_OK ) { return HSHCAL001_ERROR ; } return HSHCAL001_OK ; }
@brief  Set output data rate
 @param  pObj the device pObj
 @param  Odr the output data rate value to be set
 @retval 0 in case of success, an error code otherwise
@brief Set output data rate @param pObj the device pObj @param Odr the output data rate value to be set @retval 0 in case of success an error code otherwise