/* Selects Batching Data Rate (writing frequency in FIFO) for fourth data set..  */
int32_t lsm6dsl_fifo_dataset_4_batch_set(stmdev_ctx_t *ctx, lsm6dsl_dec_ds4_fifo_t val)
/* Selects Batching Data Rate (writing frequency in FIFO) for fourth data set..  */
int32_t lsm6dsl_fifo_dataset_4_batch_set(stmdev_ctx_t *ctx, lsm6dsl_dec_ds4_fifo_t val)
{
  lsm6dsl_fifo_ctrl4_t fifo_ctrl4;
  int32_t ret;
  ret = lsm6dsl_read_reg(ctx, LSM6DSL_FIFO_CTRL4, (uint8_t*)&fifo_ctrl4, 1);
  if(ret == 0){
    fifo_ctrl4.dec_ds4_fifo = (uint8_t)val;
    ret = lsm6dsl_write_reg(ctx, LSM6DSL_FIFO_CTRL4,
                            (uint8_t*)&fifo_ctrl4, 1);
  }
  return ret;
}