ADT7320 temperature sensor.
Fork of T_adt7320 by
Diff: adt7320.h
- Revision:
- 0:e252ae2774e8
- Child:
- 1:1b9f706b8abc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/adt7320.h Thu Oct 02 19:25:55 2014 +0000 @@ -0,0 +1,35 @@ +#ifndef ADT7320_H +#define ADT7320_H + +/* + + adt7320 interface + +*/ +#include "solid_sctrl_def.h" +#include "SWSPI.h" + +class adt7320 { + +void set_spi_mode(u8 nrbyte); +u8 format_cmd( u8 reg, bool rw); +SWSPI* spi; +DigitalOut* cs; + +public: + + adt7320(SWSPI *spiinterface ,DigitalOut* chipselect ); + float getTemperature(){return -280;}; + u8 getR08( u8 addr); + u16 getR16( u8 addr); + u8 getId(); + u16 get_TcritSP(); + u16 get_T(); // get the temperature register + + +}; + + + + +#endif \ No newline at end of file