/* Get the IIS2MDC magnetometer sensor output data rate.  */
int32_t IIS2MDC_MAG_GetOutputDataRate(IIS2MDC_Object_t *pObj, float *Odr)
/* Get the IIS2MDC magnetometer sensor output data rate.  */
int32_t IIS2MDC_MAG_GetOutputDataRate(IIS2MDC_Object_t *pObj, float *Odr)
{
  int32_t ret = IIS2MDC_OK;
  iis2mdc_odr_t odr_low_level;
  if (iis2mdc_data_rate_get(&(pObj->Ctx), &odr_low_level) != IIS2MDC_OK)
  {
    return IIS2MDC_ERROR;
  }
  switch (odr_low_level)
  {
    case IIS2MDC_ODR_10Hz:
      *Odr = 10.0f;
      break;
    case IIS2MDC_ODR_20Hz:
      *Odr = 20.0f;
      break;
    case IIS2MDC_ODR_50Hz:
      *Odr = 50.0f;
      break;
    case IIS2MDC_ODR_100Hz:
      *Odr = 100.0f;
      break;
    default:
      ret = IIS2MDC_ERROR;
      break;
  }
  return ret;
}