Simple DS1621 temperature acquisition.

Dependents:   S3_DS1621

Revision:
1:bef707045d41
Parent:
0:d1667b4536dd
Child:
3:d6310fd6df8e
--- a/ds1621.h	Sat Mar 05 20:35:01 2011 +0000
+++ b/ds1621.h	Mon Mar 07 08:11:25 2011 +0000
@@ -10,17 +10,17 @@
 * // Continus temperature acquisition
 * #include "mbed.h"
 * #include "ds1621.h"
-* 
+*
 * DigitalOut myled1(LED1);
 * DigitalOut myled2(LED2);
 * DigitalOut myled3(LED3);
 * DigitalOut myled4(LED4);
 *
-* #define DS1621_ADDR 0     // I2c DS1621 address is 0x00 
+* #define DS1621_ADDR 0     // I2c DS1621 address is 0x00
 *
 * Serial pc(USBTX, USBRX);  // Declare usb (see screen /dev/ttyUSB0 on linux)
-* I2C    i2c(p28, p27);     // Declare I2C (pullup resistor 2.2k clk + cda -> 3.3v)
-* DS1621 ds(&i2c, DS1621_ADDR, &pc);  // Declare ds1621 throught i2c interface
+* I2C    i2c(p28, p27);     // Declare I2C (pullup resistors 2.2k from p28 and p27 to +3.3v)
+* DS1621 ds(&i2c, DS1621_ADDR, &pc);  // Declare ds1621 throught i2c interface with debugger on
 *
 *int main() {
 *    i2c.frequency(5000); //5khz
@@ -62,6 +62,22 @@
     *@return current temperature as a float number in degrees Celsius
     */
     float getTemp(uint8_t address);
+
+    /**
+    *@brief Get the debugger interfave
+    *@return interface debugger used
+    */
+    Serial* getDebugger() {
+        return dbx;
+    }
+
+    /**
+    *@brief Set the debugger interface
+    *@param dbx new debugger interface
+    */
+    void setDebugger(Serial* d) {
+        dbx = d;
+    }
 //---------- local variables ----------
 private:
     I2C* i2c; // Communication interface