/* Sensor synchronization time frame with the step of 500 ms and full range of 5s. Unsigned 8-bit..  */
int32_t lsm6dsl_sh_sync_sens_frame_set(stmdev_ctx_t *ctx, uint8_t val)
/* Sensor synchronization time frame with the step of 500 ms and full range of 5s. Unsigned 8-bit..  */
int32_t lsm6dsl_sh_sync_sens_frame_set(stmdev_ctx_t *ctx, uint8_t val)
{
  lsm6dsl_sensor_sync_time_frame_t sensor_sync_time_frame;
  int32_t ret;
  ret = lsm6dsl_read_reg(ctx, LSM6DSL_SENSOR_SYNC_TIME_FRAME,
                         (uint8_t*)&sensor_sync_time_frame, 1);
  if(ret == 0){
     sensor_sync_time_frame.tph = val;
    ret = lsm6dsl_write_reg(ctx, LSM6DSL_SENSOR_SYNC_TIME_FRAME,
                            (uint8_t*)&sensor_sync_time_frame, 1);
  }
  return ret;
}