A feature complete driver for the LM75B temperature sensor from NXP.

Fork of LM75B by Neil Thiessen

Revision:
13:27c19044ace6
Parent:
12:fc27dc535ea9
Child:
14:3a44310726fe
--- a/LM75B.h	Mon Sep 16 21:32:18 2013 +0000
+++ b/LM75B.h	Thu Nov 07 17:42:41 2013 +0000
@@ -109,13 +109,13 @@
      *   'true' if the device exists on the bus,
      *   'false' if the device doesn't exist on the bus.
      */
-    bool open(void);
+    bool open();
 
     /** Get the current power mode of the LM75B
      *
      * @returns The current power mode as a PowerMode enum.
      */
-    LM75B::PowerMode powerMode(void);
+    LM75B::PowerMode powerMode();
 
     /** Set the power mode of the LM75B
      *
@@ -127,7 +127,7 @@
      *
      * @returns The current OS pin mode as an OSMode enum.
      */
-    LM75B::OSMode osMode(void);
+    LM75B::OSMode osMode();
 
     /** Set the OS pin mode of the LM75B
      *
@@ -139,7 +139,7 @@
      *
      * @returns The current OS pin polarity as an OSPolarity enum.
      */
-    LM75B::OSPolarity osPolarity(void);
+    LM75B::OSPolarity osPolarity();
 
     /** Set the OS pin polarity of the LM75B
      *
@@ -151,7 +151,7 @@
      *
      * @returns The current OS pin fault queue length as an OSFaultQueue enum.
      */
-    LM75B::OSFaultQueue osFaultQueue(void);
+    LM75B::OSFaultQueue osFaultQueue();
 
     /** Set the OS pin fault queue length of the LM75B
      *
@@ -163,7 +163,7 @@
      *
      * @returns The current alert temperature threshold in °C.
      */
-    float alertTemp(void);
+    float alertTemp();
 
     /** Set the alert temperature threshold of the LM75B
      *
@@ -175,7 +175,7 @@
      *
      * @returns The current alert temperature hysteresis threshold in °C.
      */
-    float alertHyst(void);
+    float alertHyst();
 
     /** Set the alert temperature hysteresis threshold of the LM75B
      *
@@ -187,16 +187,14 @@
      *
      * @returns The current temperature measurement in °C.
      */
-    float temp(void);
+    float temp();
 
 #ifdef MBED_OPERATORS
     /** A shorthand for temp()
      *
      * @returns The current temperature measurement in °C.
      */
-    operator float() {
-        return temp();
-    }
+    operator float();
 #endif
 
 private:
@@ -210,7 +208,7 @@
 
     //Member variables
     I2C m_I2C;
-    int m_Addr;
+    const int m_ADDR;
 
     //Internal functions
     char read8(char reg);