Library to communicate with LDC1614

Dependencies:   SHTx

Dependents:   Inductive_Sensor_3

Fork of LDC1101 by Bob Giesberts

Revision:
17:a5cf2b4bec13
Parent:
16:07d0e43c2d12
Child:
18:fc9bb81a631f
--- a/LDC1101.h	Thu Dec 10 15:12:16 2015 +0000
+++ b/LDC1101.h	Sat Dec 12 11:26:23 2015 +0000
@@ -30,6 +30,12 @@
                 LDC_MODE_STANDBY = 1, \
                 LDC_MODE_SHUTDOWN = 2} LDC_MODE;
 
+typedef enum {  DIVIDER_1 = 0, \
+                DIVIDER_2 = 1, \
+                DIVIDER_4 = 2, \
+                DIVIDER_8 = 3} DIVIDER;
+
+
 /**
 * Class for the LDC1101.
 * @author Victor Sluiter
@@ -56,6 +62,17 @@
         void init(void);
         
         /**
+        * @brief Sensor divider (p.26)
+        * @param div 
+        * Divides the sensor by a certain amount
+        * - DIVIDER_1
+        * - DIVIDER_2
+        * - DIVIDER_4
+        * - DIVIDER_8
+        **/
+        void setDivider(DIVIDER div);
+        
+        /**
         * @brief get the calculated inductance value
         **/
         float getInductance(void);
@@ -107,6 +124,7 @@
         uint32_t readRawCounts(void);
         uint32_t readINTB(void); // EXTRA UNTB Read register
         LDC_RESPONSE _responsetime;
+        DIVIDER _divider;
         float _fsensor;
         float _inductance;
         float _frequency; //frequency of external clock
@@ -117,7 +135,7 @@
         SPI _spiport;
         DigitalOut _cs_pin;
        
-        FastPWM _clock;
+        //FastPWM _clock;
 };
 
 #endif
\ No newline at end of file