bma456.c
/*!
 *  @brief This API gets the output for activity feature.
 */
@brief This API gets the output for activity feature.
@brief This API gets the output for activity feature .
uint16_t bma456_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 == BMA456_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;
}
uint16_t bma456_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 == BMA456_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 ; }
@brief This API gets the output for activity feature.
@brief This API gets the output for activity feature .
/* Reads the activity output from the gpio register */