LTC2945 ported

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
odtulumbedder
Date:
Wed Sep 20 09:03:56 2017 +0000
Parent:
3:2ab78e7e8518
Commit message:
I decided to remove the C-linkage specifiers, they are really not that necessary.

Changed in this revision

LTC2945.cpp Show annotated file Show diff for this revision Revisions of this file
LTC2945.h Show annotated file Show diff for this revision Revisions of this file
LT_I2C.cpp Show annotated file Show diff for this revision Revisions of this file
LT_I2C.h Show annotated file Show diff for this revision Revisions of this file
diff -r 2ab78e7e8518 -r d32eaca53504 LTC2945.cpp
--- a/LTC2945.cpp	Fri Aug 25 14:42:14 2017 +0000
+++ b/LTC2945.cpp	Wed Sep 20 09:03:56 2017 +0000
@@ -95,8 +95,6 @@
   uint8_t LT_byte[4];  //!< 4 bytes (unsigned 8-bit integers) to be converted to a 32-bit signed or unsigned integer
 };
 
-extern "C" {
-
 // Write an 8-bit code to the LTC2945.
 int8_t LTC2945_write(uint8_t i2c_address, uint8_t adc_command, uint8_t code)
 // The function returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.
@@ -230,5 +228,3 @@
   power = voltage/resistor;                               //! 2) Calculate Power, P = V^2/R
   return(power);
 }
-
-}
diff -r 2ab78e7e8518 -r d32eaca53504 LTC2945.h
--- a/LTC2945.h	Fri Aug 25 14:42:14 2017 +0000
+++ b/LTC2945.h	Wed Sep 20 09:03:56 2017 +0000
@@ -367,10 +367,6 @@
 #define LTC2945_DISABLE_MIN_ADIN_ALERT          0xFE
 //! @}
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 //! Write an 8-bit code to the LTC2945.
 //! @return The function returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.
 int8_t LTC2945_write(uint8_t i2c_address, //!< Register address for the LTC2945
@@ -443,8 +439,4 @@
                                  float LTC2945_ADIN_DELTA_SENSE_lsb     //!< Power lsb weight
                                 );
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif  // LTC2945_H
diff -r 2ab78e7e8518 -r d32eaca53504 LT_I2C.cpp
--- a/LT_I2C.cpp	Fri Aug 25 14:42:14 2017 +0000
+++ b/LT_I2C.cpp	Wed Sep 20 09:03:56 2017 +0000
@@ -6,8 +6,6 @@
 
 I2C *i2c_object = NULL;
 
-extern "C" {
-
 int lt_i2c_init(int sda, int scl) {
     if (i2c_object == NULL) {
         i2c_object = new I2C((PinName) sda, (PinName) scl);
@@ -253,5 +251,3 @@
     lt_i2c_stop(); //I2C STOP    
     return (0); // Success!
 }
-
-}
diff -r 2ab78e7e8518 -r d32eaca53504 LT_I2C.h
--- a/LT_I2C.h	Fri Aug 25 14:42:14 2017 +0000
+++ b/LT_I2C.h	Wed Sep 20 09:03:56 2017 +0000
@@ -5,10 +5,6 @@
 
 #include <stdint.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #define LT_I2C_READ_BIT    0x01
 #define LT_I2C_WRITE_BIT   0x00
 #define LT_I2C_WITH_NACK       1
@@ -65,8 +61,4 @@
     uint8_t length,
     uint8_t *values);
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif // _LT_I2C_COMPAT_H_INCLUDED