libraries/hshcal001.c
static int32_t HSHCAL001_GetOutputDataRate(HSHCAL001_Object_t *pObj, float *Odr)
{
  int32_t ret = HSHCAL001_OK;
  hshcal001_odr_t odr_low_level;

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

  switch (odr_low_level)
  {
 

    case HSHCAL001_ODR_1Hz:
      *Odr = 1.0f;
      break;

    case HSHCAL001_ODR_5Hz:
      *Odr = 5.0f;
      break;

    case HSHCAL001_ODR_10Hz:
      *Odr = 10.0f;
      break;
	  
	case HSHCAL001_ODR_50Hz:
      *Odr = 50.0f;
      break;

    default:
      ret = HSHCAL001_ERROR;
      break;
  }

  return ret;
}
/**
 * @brief  Get output data rate
 * @param  pObj the device pObj
 * @param  Odr the output data rate value
 * @retval 0 in case of success, an error code otherwise
 */
@brief  Get output data rate
@param  pObj the device pObj
@param  Odr the output data rate value
@retval 0 in case of success, an error code otherwise
@brief Get output data rate @param pObj the device pObj @param Odr the output data rate value @retval 0 in case of success an error code otherwise
static int32_t HSHCAL001_GetOutputDataRate(HSHCAL001_Object_t *pObj, float *Odr)
{
  int32_t ret = HSHCAL001_OK;
  hshcal001_odr_t odr_low_level;
  if (hshcal001_data_rate_get(&(pObj->Ctx), &odr_low_level) != HSHCAL001_OK)
  {
    return HSHCAL001_ERROR;
  }
  switch (odr_low_level)
  {
    case HSHCAL001_ODR_1Hz:
      *Odr = 1.0f;
      break;
    case HSHCAL001_ODR_5Hz:
      *Odr = 5.0f;
      break;
    case HSHCAL001_ODR_10Hz:
      *Odr = 10.0f;
      break;
	case HSHCAL001_ODR_50Hz:
      *Odr = 50.0f;
      break;
    default:
      ret = HSHCAL001_ERROR;
      break;
  }
  return ret;
}
static int32_t HSHCAL001_GetOutputDataRate ( HSHCAL001_Object_t * pObj , float * Odr ) { int32_t ret = HSHCAL001_OK ; hshcal001_odr_t odr_low_level ; if ( hshcal001_data_rate_get ( & ( pObj -> Ctx ) , & odr_low_level ) != HSHCAL001_OK ) { return HSHCAL001_ERROR ; } switch ( odr_low_level ) { case HSHCAL001_ODR_1Hz : * Odr = 1.0f ; break ; case HSHCAL001_ODR_5Hz : * Odr = 5.0f ; break ; case HSHCAL001_ODR_10Hz : * Odr = 10.0f ; break ; case HSHCAL001_ODR_50Hz : * Odr = 50.0f ; break ; default : ret = HSHCAL001_ERROR ; break ; } return ret ; }
@brief  Get output data rate
 @param  pObj the device pObj
 @param  Odr the output data rate value
 @retval 0 in case of success, an error code otherwise
@brief Get output data rate @param pObj the device pObj @param Odr the output data rate value @retval 0 in case of success an error code otherwise