interface for the temperature sensor chip adt7320, with sw SPI interface

Dependents:   SPItest sscm

Revision:
3:49638acbc5d4
Parent:
2:2b886cea4fcb
Child:
4:ee71e7bca786
--- a/adt7320.h	Tue Oct 14 17:10:50 2014 +0000
+++ b/adt7320.h	Wed Oct 22 10:30:04 2014 +0000
@@ -2,15 +2,19 @@
 #define ADT7320_H
 
 /* 
+ * class to read the  adt7320 temperature sensor via SPI 
+ * 
+ * v1.20 implemented float temperature readout 
+ *
+ * W. Beaumont 
+ * (C) 2014 Universiteit Antwerpen
+*/ 
 
- adt7320 interface 
-
-*/
 #include "solid_sctrl_def.h" 
 #include "getVersion.h"
 #include "SWSPI.h"
 
-#define ADT7320_HDR_VER "1.14" 
+#define ADT7320_HDR_VER "1.20" 
 
 class adt7320 : public getVersion{
 
@@ -25,11 +29,12 @@
     void setR08( u8 addr, u8 datain);
     u16  getR16( u8 addr);
     void  setR16( u8 addr, u16 datain);
+    u8 Tmode ;
         
 public:
 
     adt7320(SWSPI *spiinterface ,DigitalOut* chipselect );
-    float getTemperature(){return -280;};    // to be implenented 
+    float getTemperature();
     u8  getId();
     u16 get_TcritSP();
     void set_TcritSP(u16 tcrit);