ADT7320 temperature sensor.

Dependents:   sscm

Fork of T_adt7320 by wimbeaumont Project

adt7320.h

Committer:
wbeaumont
Date:
2014-10-02
Revision:
0:e252ae2774e8
Child:
1:1b9f706b8abc

File content as of revision 0:e252ae2774e8:

#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