/* Enable pedometer step counter and timestamp as 4th FIFO data set..  */
int32_t lsm6dsl_fifo_pedo_and_timestamp_batch_set(stmdev_ctx_t *ctx, uint8_t val)
/* Enable pedometer step counter and timestamp as 4th FIFO data set..  */
int32_t lsm6dsl_fifo_pedo_and_timestamp_batch_set(stmdev_ctx_t *ctx, uint8_t val)
{
  lsm6dsl_fifo_ctrl2_t fifo_ctrl2;
  int32_t ret;
  ret = lsm6dsl_read_reg(ctx, LSM6DSL_FIFO_CTRL2, (uint8_t*)&fifo_ctrl2, 1);
  if(ret == 0){
    fifo_ctrl2.timer_pedo_fifo_en = val;
    ret = lsm6dsl_write_reg(ctx, LSM6DSL_FIFO_CTRL2,
                            (uint8_t*)&fifo_ctrl2, 1);
  }
  return ret;
}