Bob Giesberts / LDC1614

Dependencies:   SHTx

Dependents:   Inductive_Sensor_3

Fork of LDC1101 by Bob Giesberts

Revision:
12:312970050c8c
Parent:
11:0f53fbf73613
--- a/LDC1000.cpp	Fri May 29 13:45:48 2015 +0000
+++ b/LDC1000.cpp	Mon Jun 01 08:21:11 2015 +0000
@@ -41,7 +41,6 @@
     buffer &= 0xE7; //clear amplitude bits
     buffer |= (amplitude<<3) & 0x18;
     writeSPI(&buffer,0x04);
-
 }
 
 void LDC1000::setWatchdog(float frequency)
@@ -78,12 +77,11 @@
 };
 
 
-/* reads all 5 registers also after cable reconnect but het returns just one byte*/
 uint32_t LDC1000::readRawCounts(void)
 {
     uint8_t val[5];
     readSPI(val,0x21,5);
-    unsigned int combinedbytes = (val[4]<<16)| (val[3]<<8) | val[2];  // combine the 3 bytes from registers 23, 24 and 25 
+    uint32_t combinedbytes = (val[4]<<16)| (val[3]<<8) | val[2];  // combine the content of the 3 bytes from registers 23, 24 and 25 
     return combinedbytes;
 }
 
@@ -124,5 +122,4 @@
     float LDC1000::get_frequency()      {return _frequency;};    
     float LDC1000::get_responsetime()   {return _responsetime;};    
     float LDC1000::get_cap()            {return cap;};
-// END ***********************************************************
-
+// END ***********************************************************
\ No newline at end of file