Fork of original LPS331 library Changed the I2C address to 0xBA

Revision:
0:ef4f624dc3ec
Child:
1:f70e671b008f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LPS331.h	Sat Oct 04 12:02:25 2014 +0000
@@ -0,0 +1,60 @@
+//**********************
+// LPS331.h for mbed
+//
+// (C)Copyright 2014 All rights reserved by Y.Onodera
+// http://einstlab.web.fc2.com
+//**********************
+
+#ifndef LPS331_H_
+#define LPS331_H_
+
+#define LPS331_ADDR 0xB8
+#define LPS331_REF_P_XL 0x08
+#define LPS331_REF_P_L  0x09
+#define LPS331_REF_P_H  0x0A
+#define LPS331_WHO_AM_I 0x0F
+#define LPS331_RES_CONF 0x10
+#define LPS331_CTRL_REG1    0x20
+#define LPS331_CTRL_REG2    0x21
+#define LPS331_CTRL_REG3    0x22
+#define LPS331_INT_CFG_REG  0x23
+#define LPS331_INT_SOURCE_REG   0x24
+#define LPS331_THS_P_LOW_REG    0x25
+#define LPS331_THS_P_HIGH_REG   0x26
+#define LPS331_STATUS_REG   0x27
+#define LPS331_PRESS_POUT_XL_REH    0x28
+#define LPS331_PRESS_OUT_L  0x29
+#define LPS331_PRESS_OUT_H  0x2A
+#define LPS331_TEMP_OUT_L   0x2B
+#define LPS331_TEMP_OUT_H   0x2C
+#define LPS331_AMP_CTRL 0x2D
+#define LPS331_DELTA_PRESS_XL   0x3C
+#define LPS331_DELTA_PRESS_H    0x3D
+#define LPS331_DELTA_PRESS_L    0x3E
+
+#include "mbed.h"
+#include "typedef.h"
+
+class LPS331{
+public:
+    LPS331 (PinName sda, PinName scl);
+    LPS331 (I2C& p_i2c);
+    void init();
+
+    void put(unsigned char a, unsigned char b);
+    void get(unsigned char a);
+    long value();
+
+protected:
+    
+    I2C _i2c;
+
+    DWORD_VAL press;
+    char buf[2];
+
+};
+
+#endif /* LPS331_H_ */
+
+
+