lib for working with ltc2991s

Dependents:   ece495_firmware

Fork of ltc2991_test by Logan Rooper

Revision:
2:c9e727dcd00e
Parent:
1:4e4194db7cd6
--- a/LTC2991.h	Tue Nov 29 03:20:35 2016 +0000
+++ b/LTC2991.h	Tue Dec 06 18:34:46 2016 +0000
@@ -259,6 +259,19 @@
 #define LTC2991_INT_KELVIN_ENABLE             0x04 //!< Enable internal temperature for Kelvin. Otherwise, Celsius.
 /*!@} */
 
+#include "LT_I2C.h"
+
+
+class LTC2991 {
+
+private:
+    LT_I2C *lti2c;
+
+
+public:
+LTC2991();
+LTC2991(PinName i2c_scl_, PinName i2c_sda_);
+
 //! Reads a 14-bit adc_code from LTC2991.
 //! @return Returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.
 int8_t LTC2991_adc_read(uint8_t i2c_address,    //!< I2C address of the LTC2991. Configured by tying the ADR0, ADR1, and ADR2 pins high or low. See Table 1 of datasheet.
@@ -352,5 +365,5 @@
 float LTC2991_code_to_diode_voltage(int16_t adc_code,               //!< code read from the adc (from a function such as LTC2991_adc_read)
                                     float LTC2991_diode_voltage_lsb //!< diode voltage LSB weight. If not calibrated, use LTC2991_DIODE_VOLTAGE_LSB
                                    );
-
+};
 #endif  // LTC2991_H