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

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
okini3939
Date:
Thu Oct 14 11:27:32 2010 +0000
Parent:
0:dbba605ca87c
Commit message:

Changed in this revision

BMP085/.meta Show diff for this revision Revisions of this file
BMP085/BMP085.cpp Show annotated file Show diff for this revision Revisions of this file
BMP085/BMP085.h Show annotated file Show diff for this revision Revisions of this file
--- a/BMP085/.meta	Mon Sep 27 15:55:35 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-<?xml version="1.0"?>
-<root>
-  <global/>
-  <data>
-    <created_ts>1284991866</created_ts>
-    <last_mod_ts>1284991866</last_mod_ts>
-    <is_archive>0</is_archive>
-    <is_published>0</is_published>
-    <is_svn>0</is_svn>
-    <is_module>0</is_module>
-    <is_lib>1</is_lib>
-  </data>
-</root>
--- a/BMP085/BMP085.cpp	Mon Sep 27 15:55:35 2010 +0000
+++ b/BMP085/BMP085.cpp	Thu Oct 14 11:27:32 2010 +0000
@@ -83,12 +83,6 @@
 }
 
 unsigned short BMP085::twi_readshort (int id, int addr) {
-
-    i2c.start();
-    i2c.write(id);
-    i2c.write(addr);
-
-    i2c.start();
     unsigned short i;
 
     i2c.start();
@@ -121,13 +115,11 @@
     return i;
 }
 
-char BMP085::twi_writechar (int id, int addr, int dat) {
+void BMP085::twi_writechar (int id, int addr, int dat) {
 
     i2c.start();
     i2c.write(id);
     i2c.write(addr);
     i2c.write(dat);
     i2c.stop();
-
-    return 0;
 }
--- a/BMP085/BMP085.h	Mon Sep 27 15:55:35 2010 +0000
+++ b/BMP085/BMP085.h	Thu Oct 14 11:27:32 2010 +0000
@@ -29,7 +29,7 @@
     void init(BMP085_oss);
     unsigned short twi_readshort (int, int);
     unsigned long twi_readlong (int, int);
-    char twi_writechar (int, int, int);
+    void twi_writechar (int, int, int);
 
     I2C i2c;
     float temperature;