/* Bosch BMP085 barometric sensor driver initialization. 
This is the main initialization function for the BMP085 device. */
bool bmp085_init(sensor_t *sensor, int resvd)
/* Bosch BMP085 barometric sensor driver initialization. 
This is the main initialization function for the BMP085 device. */
bool bmp085_init(sensor_t *sensor, int resvd)
{
	bool status = false;
	sensor_hal_t *const hal = sensor->hal;
	if ((BMP085_ID_VAL == sensor_bus_get(hal, BMP_CHIP_ID)) &&
			(BMP085_VER_VAL ==
			sensor_bus_get(hal, BMP_CHIP_VERSION))) {
		status = bmp_get_cal_param(hal);
		static const sensor_device_t bmp085_device = {
			.func.read    = bmp_read,
			.func.ioctl   = bmp_ioctl,
			.caps.feature = SENSOR_CAPS_AUX_TEMP,
			.caps.vendor  = SENSOR_VENDOR_BOSCH,
			.caps.units   = SENSOR_UNITS_pascal,
			.caps.name    = "BMP085 Digital pressure sensor"
		};
		sensor->drv = &bmp085_device;
		sensor_oss = OSS_STANDARD;
		hal->resolution = BMP_RESOLUTION;
	}
	return status;
}