WIP
This commit is contained in:
@@ -24,8 +24,9 @@ extern "C"
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
ZH_DHT11, ///< Sensor type DHT11.
|
||||
ZH_DHT22 ///< Sensor type DHT22 or AM2302.
|
||||
ZH_DHT11, ///< Sensor type DHT11.
|
||||
ZH_DHT22, ///< Sensor type DHT22 or AM2302.
|
||||
ZH_AM2320, ///< Sensor type AM2320.
|
||||
} zh_dht_sensor_type_t;
|
||||
|
||||
/**
|
||||
@@ -34,7 +35,7 @@ extern "C"
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
uint8_t sensor_pin; ///< Sensor GPIO connection. @note
|
||||
uint8_t sensor_pin; ///< Sensor GPIO connection. @note Can be NULL for AM2320 sensor with I2C connection.
|
||||
zh_dht_sensor_type_t sensor_type; ///< Sensor type. @note
|
||||
} zh_dht_handle_t;
|
||||
|
||||
@@ -46,7 +47,7 @@ extern "C"
|
||||
*
|
||||
* @return Handle of the sensor
|
||||
*/
|
||||
zh_dht_handle_t zh_dht_init(const zh_dht_sensor_type_t sensor_type, const uint8_t sensor_pin);
|
||||
zh_dht_handle_t zh_dht_init(const zh_dht_sensor_type_t sensor_type, const uint8_t *sensor_pin);
|
||||
|
||||
/**
|
||||
* @brief Read DHT sensor.
|
||||
|
Reference in New Issue
Block a user