bma456.c
/*!
 *	@brief This API is the entry point.
 *	Call this API before using all other APIs.
 *	This API reads the chip-id of the sensor and sets the resolution.
 */
@brief This API is the entry point.
Call this API before using all other APIs.
This API reads the chip-id of the sensor and sets the resolution.
@brief This API is the entry point . Call this API before using all other APIs . This API reads the chip - id of the sensor and sets the resolution .
uint16_t bma456_init(struct bma4_dev *dev)
{
	uint16_t rslt;
	rslt = bma4_init(dev);
	if (rslt == BMA4_OK) {
		if (dev->chip_id == BMA456_CHIP_ID) {
			dev->resolution = 16;
			dev->feature_len = BMA456_FEATURE_SIZE;
			dev->variant = BMA45X_VARIANT;
		} else {
			rslt |= BMA4_E_INVALID_SENSOR;
		}
	}
	return rslt;
}
uint16_t bma456_init ( struct bma4_dev * dev ) { uint16_t rslt ; rslt = bma4_init ( dev ) ; if ( rslt == BMA4_OK ) { if ( dev -> chip_id == BMA456_CHIP_ID ) { dev -> resolution = 16 ; dev -> feature_len = BMA456_FEATURE_SIZE ; dev -> variant = BMA45X_VARIANT ; } else { rslt |= BMA4_E_INVALID_SENSOR ; } } return rslt ; }
@brief This API is the entry point.
@brief This API is the entry point .
/* Resolution of BMA456 sensor is 16 bit */