/* Circular burst-mode (rounding) read from output registers through the primary interface..  */
int32_t lsm6dsl_rounding_mode_set(stmdev_ctx_t *ctx, lsm6dsl_rounding_t val)
/* Circular burst-mode (rounding) read from output registers through the primary interface..  */
int32_t lsm6dsl_rounding_mode_set(stmdev_ctx_t *ctx, lsm6dsl_rounding_t val)
{
  lsm6dsl_ctrl5_c_t ctrl5_c;
  int32_t ret;
  ret = lsm6dsl_read_reg(ctx, LSM6DSL_CTRL5_C, (uint8_t*)&ctrl5_c, 1);
  if(ret == 0){
    ctrl5_c.rounding = (uint8_t) val;
    ret = lsm6dsl_write_reg(ctx, LSM6DSL_CTRL5_C, (uint8_t*)&ctrl5_c, 1);
  }
  return ret;
}