/* Configures the FIFO feature. Uses ADXL367_14B_CHID read mode as default.  */
int adxl367_fifo_setup(const struct device *dev, enum adxl367_fifo_mode mode, enum adxl367_fifo_format format, enum adxl367_fifo_read_mode read_mode, uint8_t sets_nb)
/* Configures the FIFO feature. Uses ADXL367_14B_CHID read mode as default.  */
int adxl367_fifo_setup(const struct device *dev, enum adxl367_fifo_mode mode, enum adxl367_fifo_format format, enum adxl367_fifo_read_mode read_mode, uint8_t sets_nb)
{
	int ret;
	ret = adxl367_set_fifo_mode(dev, mode);
	if (ret != 0) {
		return ret;
	}
	ret = adxl367_set_fifo_format(dev, format);
	if (ret != 0) {
		return ret;
	}
	ret = adxl367_set_fifo_sample_sets_nb(dev, sets_nb);
	if (ret != 0) {
		return ret;
	}
	return adxl367_set_fifo_read_mode(dev, read_mode);
}