/* Source register rounding function on WAKE_UP_SRC (1Bh), TAP_SRC (1Ch), D6D_SRC (1Dh), STATUS_REG (1Eh) and FUNC_SRC1 (53h) registers in the primary interface..  */
int32_t lsm6dsl_rounding_on_status_set(stmdev_ctx_t *ctx, lsm6dsl_rounding_status_t val)
/* Source register rounding function on WAKE_UP_SRC (1Bh), TAP_SRC (1Ch), D6D_SRC (1Dh), STATUS_REG (1Eh) and FUNC_SRC1 (53h) registers in the primary interface..  */
int32_t lsm6dsl_rounding_on_status_set(stmdev_ctx_t *ctx, lsm6dsl_rounding_status_t val)
{
  lsm6dsl_ctrl7_g_t ctrl7_g;
  int32_t ret;
  ret = lsm6dsl_read_reg(ctx, LSM6DSL_CTRL7_G, (uint8_t*)&ctrl7_g, 1);
  if(ret == 0){
    ctrl7_g.rounding_status = (uint8_t) val;
    ret = lsm6dsl_write_reg(ctx, LSM6DSL_CTRL7_G, (uint8_t*)&ctrl7_g, 1);
  }
  return ret;
}