barometric pressure sensor BMP085 http://mbed.org/users/okini3939/notebook/barometric-pressure-sensor-bmp085/ http://mbed.org/users/okini3939/notebook/weatherduino-on-mbed/

Dependents:   WeatherPlatform_20110408 WeatherPlatform ENVLogger WeatherStation ... more

Revision:
1:80e4c62baf09
Parent:
0:6245372b9179
Child:
2:5e2b1f3c0a6a
--- a/BMP085.cpp	Thu Oct 14 11:28:45 2010 +0000
+++ b/BMP085.cpp	Mon Dec 13 14:02:24 2010 +0000
@@ -4,29 +4,56 @@
  * Released under the MIT License: http://mbed.org/license/mit
  */
 
+/** @file BMP085.cpp
+ * @brief mbed library to use a Bosch Sensortec BMP085 sensor
+ * barometric pressure sensor BMP085 (Bosch Sensortec)
+ * interface: I2C digital
+ */
+
 #include "mbed.h"
 #include "BMP085.h"
 
 #define WEATHER_BMP085 0xee
 #define xpow(x, y) ((long)1 << y)
 
-
+/**
+ * @brief Initializes interface (private I2C)
+ * @param p_sda port of I2C SDA
+ * @param p_scl port of I2C SCL
+ * @param p_oss parameter of OSS
+ */
 BMP085::BMP085 (PinName p_sda, PinName p_scl, BMP085_oss p_oss) : i2c(p_sda, p_scl) {
     init(p_oss);
 }
 
+/**
+ * @brief Initializes interface (public I2C)
+ * @param p_i2c instance of I2C class
+ * @param p_oss parameter of OSS
+ */
 BMP085::BMP085 (I2C& p_i2c, BMP085_oss p_oss) : i2c(p_i2c) { 
     init(p_oss);
 }
 
+/**
+ * @brief Get temperature
+ * @return temperature (`C)
+ */
 float BMP085::get_temperature() {
     return temperature;
 }
 
+/**
+ * @brief Get pressure
+ * @return pressure (hPa)
+ */
 float BMP085::get_pressure() {
     return pressure;
 }
 
+/**
+ * @brief Update results
+ */
 void BMP085::update () {
     long t, p, ut, up, x1, x2, x3, b3, b5, b6;
     unsigned long b4, b7;