Changed hts221 into Class.
Dependents: WeatherSensor-Joe PAG-CourseWork-NicksEdits SOFT253_Assignment SOFT253_Assignment_V2 ... more
Fork of hts221 by
Diff: hts221.h
- Revision:
- 2:6d7166d49741
- Parent:
- 1:da79e74eadd1
diff -r da79e74eadd1 -r 6d7166d49741 hts221.h --- a/hts221.h Fri Jul 24 15:21:28 2015 +0000 +++ b/hts221.h Wed Feb 10 19:13:37 2016 +0000 @@ -83,10 +83,15 @@ class HTS221{ public: + enum PowerMode { + POWER_NORMAL, + POWER_SHUTDOWN /**< Chip is in low-power shutdown mode */ + }; HTS221 (PinName sda, PinName scl); void calib(void); bool init(void); void ReadTempHumi( float *pTemp , float *pHumi); + void powerMode(PowerMode mode); private: void register_write(uint8_t register_address, const uint8_t value);