STMicroelectronics LPS331AP, LPS25H SPI Library. This library is base on https://developer.mbed.org/users/nyamfg/code/LPS331_I2C/

Dependents:   LPS331_SPI_Test main_SPC

Fork of LPS331_I2C by NYA Manufacturing

Revision:
4:af2153bce185
Parent:
3:5a56dd5131bb
Child:
5:760a5e23dc62
diff -r 5a56dd5131bb -r af2153bce185 LPS331_SPI.h
--- a/LPS331_SPI.h	Thu Jul 28 09:28:02 2016 +0000
+++ b/LPS331_SPI.h	Thu Jul 28 09:49:24 2016 +0000
@@ -7,6 +7,7 @@
  *  Copyright(c) -2013 unos@NYAMFG, 
  *  Released under the MIT License: http://mbed.org/license/mit
  *
+ *  revision 1.2    07-Jul-2016     SPI version.
  *  revision 1.1    22-Oct-2013     Add multibyte read, Change temperature and pressure reading method.
  *  revision 1.0    20-Oct-2013     1st release, Does not support interrupts.
  */
@@ -62,7 +63,7 @@
 class LPS331_SPI
 {
 public:
-    LPS331_SPI(PinName sda, PinName scl, bool sa0);
+    LPS331_SPI(PinName mosi, PinName miso, PinName sclk, PinName cs);
     ~LPS331_SPI();
 
     char whoami();
@@ -80,7 +81,8 @@
     void _read_multibyte(char startsubaddress, char* data, char count);
         
 private:
-    I2C _i2c;
+    SPI _spi;
+    DigitalOut _cs;
     char _address;
     char _ctrlreg1;
 };