/* This API gets the output for activity feature.  */
uint16_t bma423_activity_output(uint8_t *activity, struct bma4_dev *dev)
/* This API gets the output for activity feature.  */
uint16_t bma423_activity_output(uint8_t *activity, struct bma4_dev *dev)
{
	uint8_t data = 0;
	uint16_t rslt = BMA4_OK;
	if (dev != NULL) {
		if (dev->chip_id == BMA423_CHIP_ID) {
			rslt = bma4_read_regs(BMA4_ACTIVITY_OUT_ADDR, &data, 1, dev);
			if (rslt == BMA4_OK)
				*activity = data;
		} else {
			rslt = BMA4_E_INVALID_SENSOR;
		}
	} else {
		rslt = BMA4_E_NULL_PTR;
	}
	return rslt;
}