/* This API enables/disables the features of the sensor.  */
uint16_t bma423_feature_enable(uint8_t feature, uint8_t enable, struct bma4_dev *dev)
/* This API enables/disables the features of the sensor.  */
uint16_t bma423_feature_enable(uint8_t feature, uint8_t enable, struct bma4_dev *dev)
{
	uint8_t feature_config[BMA423_FEATURE_SIZE] = {0};
	uint16_t rslt = BMA4_OK;
	uint8_t len;
	if (dev != NULL) {
		if (dev->chip_id == BMA423_CHIP_ID) {
			update_len(&len, feature, enable);
			rslt = bma4_read_regs(BMA4_FEATURE_CONFIG_ADDR, feature_config, len, dev);
			if (rslt == BMA4_OK) {
				if (enable == TRUE) {
					rslt |= feature_enable(feature, len, feature_config, dev);
				} else {
					rslt |= feature_disable(feature, len, feature_config, dev);
				}
			}
		} else {
			rslt = BMA4_E_INVALID_SENSOR;
		}
	} else {
		rslt = BMA4_E_NULL_PTR;
	}
	return rslt;
}