- Delaying and repeating i2c operation automatically when i2c interface is busy removed. User has to deal with concurrency using semaphores.
- GPIO_ID_PIN macros removed - Soft reset mechanism of SHT3x does not work when sensor is in any measurement mode. Therefore, it does not abort initialization procedure anymore - typos - changes to use the same source code with ESP8266 (esp-open-rtos) and ESP32 (ESP-IDF)
This commit is contained in:
parent
c3ae04c93f
commit
ca0b5da905
7 changed files with 254 additions and 110 deletions
|
@ -2,13 +2,16 @@
|
|||
* Driver for Sensirion SHT3x digital temperature and humidity sensor
|
||||
* connected to I2C
|
||||
*
|
||||
* Part of esp-open-rtos
|
||||
* This driver is for the usage with the ESP8266 and FreeRTOS (esp-open-rtos)
|
||||
* [https://github.com/SuperHouse/esp-open-rtos]. It is also working with ESP32
|
||||
* and ESP-IDF [https://github.com/espressif/esp-idf.git] as well as Linux
|
||||
* based systems using a wrapper library for ESP8266 functions.
|
||||
*
|
||||
* ----------------------------------------------------------------
|
||||
*
|
||||
* The BSD License (3-clause license)
|
||||
*
|
||||
* Copyright (c) 2017 Gunar Schorcht (https://github.com/gschorcht
|
||||
* Copyright (c) 2017 Gunar Schorcht (https://github.com/gschorcht)
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -38,20 +41,18 @@
|
|||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef DRIVER_SHT3x_H_
|
||||
#define DRIVER_SHT3x_H_
|
||||
|
||||
#include "stdint.h"
|
||||
#include "stdbool.h"
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
|
||||
#include "i2c/i2c.h"
|
||||
#ifndef __SHT3x_H__
|
||||
#define __SHT3x_H__
|
||||
|
||||
// Uncomment to enable debug output
|
||||
// #define SHT3x_DEBUG_LEVEL_1 // only error messages
|
||||
// #define SHT3x_DEBUG_LEVEL_2 // error and debug messages
|
||||
|
||||
#include "stdint.h"
|
||||
#include "stdbool.h"
|
||||
|
||||
#include "sht3x_platform.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -276,4 +277,4 @@ bool sht3x_get_results (sht3x_sensor_t* dev,
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif /* DRIVER_SHT3x_H_ */
|
||||
#endif /* __SHT3x_H__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue