/* Resolution ratio of error code for sensor synchronization..  */
int32_t lsm6dsl_sh_sync_sens_ratio_set(stmdev_ctx_t *ctx, lsm6dsl_rr_t val)
/* Resolution ratio of error code for sensor synchronization..  */
int32_t lsm6dsl_sh_sync_sens_ratio_set(stmdev_ctx_t *ctx, lsm6dsl_rr_t val)
{
  lsm6dsl_sensor_sync_res_ratio_t sensor_sync_res_ratio;
  int32_t ret;
  ret = lsm6dsl_read_reg(ctx, LSM6DSL_SENSOR_SYNC_RES_RATIO,
                              (uint8_t*)&sensor_sync_res_ratio, 1);
  if(ret == 0){
    sensor_sync_res_ratio.rr = (uint8_t) val;
    ret = lsm6dsl_write_reg(ctx, LSM6DSL_SENSOR_SYNC_RES_RATIO,
                            (uint8_t*)&sensor_sync_res_ratio, 1);
  }
  return ret;
}