fooling around with sample rate

Dependents:   Proximity_Sensor_2_sense Proximity_Sensor_2_detect Proximity_Sensor_2_detect

Fork of SI1143 by MF Doom

Revision:
10:a89555c4f62a
Parent:
9:31d4e955ee92
--- a/SI1143.h	Fri May 23 21:34:54 2014 +0000
+++ b/SI1143.h	Wed Jun 04 23:12:42 2014 +0000
@@ -162,6 +162,12 @@
 #define ALS_IR_TASK                 0x20
 #define AUX_TASK                    0x40
 
+// Interrupt checks
+
+#define INT_PS1                         0x01
+#define INT_PS2                         0x02
+#define INT_PS12                        0x03
+
 /**
  * Parallax SI1143 Gesture Sensor.
  */
@@ -175,12 +181,19 @@
         * @param sda mbed pin to use for SDA line of I2C interface.
         * @param scl mbed pin to use for SCL line of I2C interface.
         */
-        SI1143(PinName sda, PinName scl);
+        SI1143(I2C* comm, PinName vcc, PinName enable, char offset);
+        
+        char adrs;
+        
+        DigitalOut* en;
+        
+        DigitalOut* on;
+        
         
         /**
          * Restarts the device.
          */
-        void restart(void);
+        void restart(char offset);
         
         /**
          * Creates a baseline for sampling measurements.
@@ -210,6 +223,8 @@
          */
         int get_ps2(int repeat);
         
+        int read_ps2();
+        
         /**
          * Takes a number of samples from the proximity of led3 and returns a raw output.
          *
@@ -237,6 +252,8 @@
         
         void clear_int();
         
+        char read_PSint();
+        
     private:
     
         I2C* i2c_;