/* Timestamp first data output register (r). The value is expressed as a 32-bit word and the bit resolution is 25 μs..  */
int32_t lsm6dso_timestamp_raw_get(stmdev_ctx_t *ctx, uint32_t *val)
/* Timestamp first data output register (r). The value is expressed as a 32-bit word and the bit resolution is 25 μs..  */
int32_t lsm6dso_timestamp_raw_get(stmdev_ctx_t *ctx, uint32_t *val)
{
  uint8_t buff[4];
  int32_t ret;
  ret = lsm6dso_read_reg(ctx, LSM6DSO_TIMESTAMP0, buff, 4);
  *val = buff[3];
  *val = (*val * 256U) +  buff[2];
  *val = (*val * 256U) +  buff[1];
  *val = (*val * 256U) +  buff[0];
  return ret;
}