bma456.c
uint16_t bma456_wakeup_get_sensitivity(uint8_t *sensitivity, struct bma4_dev *dev)
{
	uint8_t feature_config[BMA456_FEATURE_SIZE] = {0};
	uint8_t index = BMA456_WAKEUP_OFFSET;
	uint16_t rslt = BMA4_OK;

	if (dev != NULL) {
		if (dev->chip_id == BMA456_CHIP_ID) {
			rslt = bma4_read_regs(BMA4_FEATURE_CONFIG_ADDR, feature_config, BMA456_FEATURE_SIZE, dev);
			if (rslt == BMA4_OK) {
				/* Extracts sensitivity data */
				*sensitivity = BMA4_GET_BITSLICE(feature_config[index], BMA456_WAKEUP_SENS);
			}
		} else {
			rslt = BMA4_E_INVALID_SENSOR;
		}
	} else {
		rslt = BMA4_E_NULL_PTR;
	}

	return rslt;
}
/*!
 *  @brief This API gets the sensitivity of wake up feature in the sensor
 */
@brief This API gets the sensitivity of wake up feature in the sensor
@brief This API gets the sensitivity of wake up feature in the sensor
uint16_t bma456_wakeup_get_sensitivity(uint8_t *sensitivity, struct bma4_dev *dev)
{
	uint8_t feature_config[BMA456_FEATURE_SIZE] = {0};
	uint8_t index = BMA456_WAKEUP_OFFSET;
	uint16_t rslt = BMA4_OK;
	if (dev != NULL) {
		if (dev->chip_id == BMA456_CHIP_ID) {
			rslt = bma4_read_regs(BMA4_FEATURE_CONFIG_ADDR, feature_config, BMA456_FEATURE_SIZE, dev);
			if (rslt == BMA4_OK) {
				*sensitivity = BMA4_GET_BITSLICE(feature_config[index], BMA456_WAKEUP_SENS);
			}
		} else {
			rslt = BMA4_E_INVALID_SENSOR;
		}
	} else {
		rslt = BMA4_E_NULL_PTR;
	}
	return rslt;
}
uint16_t bma456_wakeup_get_sensitivity ( uint8_t * sensitivity , struct bma4_dev * dev ) { uint8_t feature_config [ BMA456_FEATURE_SIZE ] = { 0 } ; uint8_t index = BMA456_WAKEUP_OFFSET ; uint16_t rslt = BMA4_OK ; if ( dev != NULL ) { if ( dev -> chip_id == BMA456_CHIP_ID ) { rslt = bma4_read_regs ( BMA4_FEATURE_CONFIG_ADDR , feature_config , BMA456_FEATURE_SIZE , dev ) ; if ( rslt == BMA4_OK ) { * sensitivity = BMA4_GET_BITSLICE ( feature_config [ index ] , BMA456_WAKEUP_SENS ) ; } } else { rslt = BMA4_E_INVALID_SENSOR ; } } else { rslt = BMA4_E_NULL_PTR ; } return rslt ; }
@brief This API gets the sensitivity of wake up feature in the sensor
@brief This API gets the sensitivity of wake up feature in the sensor
/* Extracts sensitivity data */