I2C hang recover function added
Dependencies: UniGraphic mbed vt100
edge_temp.h
00001 #ifndef _EDGE_TEMP_H_ 00002 #define _EDGE_TEMP_H_ 00003 #include "mbed.h" 00004 #include "edge_sensor.h" 00005 #include "LM75B.h" 00006 #include "SMTC502AT.h" 00007 00008 /** 00009 * edge_temp edge_sensor to measre temperature sensors 00010 */ 00011 00012 class edge_temp : public edge_sensor { 00013 public: 00014 /** 00015 * constructor 00016 * @param *temp1 LM75B temperature sensor object (with Color1) 00017 * @param *temp2 SMTC502AT temperature sensor object (befor) 00018 * @param *temp3 SMTC502AT temperature sensor object (after) 00019 * @param *temp4 LM75B temperature sensor object (with Color2) 00020 */ 00021 edge_temp(LM75B *temp1, SMTC502AT *temp2, SMTC502AT *temp3, LM75B *temp4) ; 00022 00023 /** 00024 * destructor 00025 */ 00026 ~edge_temp(void) ; 00027 00028 /** 00029 * reset and clear the internal values 00030 */ 00031 virtual void reset(void) ; 00032 00033 /** 00034 * prepare for sampling 00035 */ 00036 virtual void prepare(void) ; 00037 00038 /** 00039 * sample measure and store sensor values 00040 * @return 0: success non-0: failure 00041 */ 00042 virtual int sample(void) ; 00043 00044 /** 00045 * deliver the values to the afero cloud 00046 */ 00047 virtual int deliver(void) ; 00048 00049 /** 00050 * Show the value(s) in the display (TFT) 00051 */ 00052 virtual void show(void) ; 00053 00054 private: 00055 LM75B *_temp1 ; 00056 SMTC502AT *_temp2 ; 00057 SMTC502AT *_temp3 ; 00058 LM75B *_temp4 ; 00059 float _ftemp[4] ; 00060 } ; 00061 00062 extern float *current_temp ; 00063 #endif /* _EDGE_TEMP_H_ */
Generated on Sat Jul 16 2022 08:26:44 by 1.7.2