Digital Humidity Sensor
Diff: SHT3X.h
- Revision:
- 2:870701ee67c4
- Parent:
- 1:c3590e18b517
- Child:
- 3:42e11b9135b5
--- a/SHT3X.h Thu Mar 25 20:02:49 2021 +0000 +++ b/SHT3X.h Thu Mar 25 20:24:25 2021 +0000 @@ -237,7 +237,7 @@ typedef enum { SHT3X_SUCCESS = 0, SHT3X_FAILURE = 1, - I2C_SUCCESS = 2 + I2C_SUCCESS = 0 } SHT3X_status_t; @@ -245,9 +245,18 @@ /** * @brief FUNCTION PROTOTYPES */ - /** It configures the I2C peripheral. + /** Create an SHT3X object connected to the specified I2C pins. + * + * @param sda I2C data pin + * @param scl I2C clock pin + * @param addr I2C slave address + * @param freq I2C frequency in Hz. */ - SHT3X_status_t SHT3X_Init ( void ); + SHT3X ( PinName sda, PinName scl, uint32_t addr, uint32_t freq ); + + /** Delete SHT3X object. + */ + ~SHT3X(); /** It triggers all the raw data in single shot mode. */