/* Time period register for step detection on delta time (r/w)..  */
int32_t lsm6dso_pedo_steps_period_get(stmdev_ctx_t *ctx, uint16_t *val)
/* Time period register for step detection on delta time (r/w)..  */
int32_t lsm6dso_pedo_steps_period_get(stmdev_ctx_t *ctx, uint16_t *val)
{
  uint8_t buff[2];
  int32_t ret;
  ret = lsm6dso_ln_pg_read_byte(ctx, LSM6DSO_PEDO_SC_DELTAT_L,
                                &buff[0]);
  if (ret == 0) {
    ret = lsm6dso_ln_pg_read_byte(ctx, LSM6DSO_PEDO_SC_DELTAT_H,
                                  &buff[1]);
    *val = buff[1];
    *val = (*val * 256U) +  buff[0];
  }
  return ret;
}