Loading...
Searching...
No Matches

Internal defines required by the SHT10/SHT11/SHT15 driver. More...

Detailed Description

Internal defines required by the SHT10/SHT11/SHT15 driver.

Author
Marian Buschsieweke maria.nosp@m.n.bu.nosp@m.schsi.nosp@m.ewek.nosp@m.e@ovg.nosp@m.u.de

Definition in file sht1x_defines.h.

#include <stdint.h>
#include <periph/gpio.h>
#include <mutex.h>
+ Include dependency graph for sht1x_defines.h:

Go to the source code of this file.

Macros

#define SHT1X_CONF_MASK   (0x07)
 Bitmask to get writable bits of the status byte.
 
#define SHT1X_SAUL_RETRIES   (3)
 How often reading the sensor should be retried in case of communication failures.
 

Possible values to pass as <tt>ack</tt> parameter to <tt>write_byte</tt>

See also
write_byte
#define SHT1X_NO_ACK   (1)
 don't ack read in read_byte
 
#define SHT1X_ACK   (0)
 do acknowledge read in read_byte
 

Commands that can be sent to the SHT1X driver

#define SHT1X_STATUS_REG_W   (0x06)
 will write to status register
 
#define SHT1X_STATUS_REG_R   (0x07)
 will read from status register
 
#define SHT1X_MEASURE_TEMP   (0x03)
 tell sensor to measure temperature
 
#define SHT1X_MEASURE_HUM   (0x05)
 tell sensor to measure humidity
 
#define SHT1X_RESET   (0x1E)
 reset the sensor
 

Timing parameters for the SHT10/SHT1X/SHT15

#define SHT1X_HALF_CLOCK   (1)
 Half clock length in µsec.
 
#define SHT1X_MEASURE_TIMEOUT   (1000)
 Timeout for the SHT1x to complete the measurement (in millisec)
 
#define SHT1X_RESET_WAIT   (11000)
 Wait 11ms after soft reset.
 

Macro Definition Documentation

◆ SHT1X_ACK

#define SHT1X_ACK   (0)

do acknowledge read in read_byte

Definition at line 37 of file sht1x_defines.h.

◆ SHT1X_CONF_MASK

#define SHT1X_CONF_MASK   (0x07)

Bitmask to get writable bits of the status byte.

Definition at line 62 of file sht1x_defines.h.

◆ SHT1X_HALF_CLOCK

#define SHT1X_HALF_CLOCK   (1)

Half clock length in µsec.

Definition at line 55 of file sht1x_defines.h.

◆ SHT1X_MEASURE_HUM

#define SHT1X_MEASURE_HUM   (0x05)

tell sensor to measure humidity

Definition at line 47 of file sht1x_defines.h.

◆ SHT1X_MEASURE_TEMP

#define SHT1X_MEASURE_TEMP   (0x03)

tell sensor to measure temperature

Definition at line 46 of file sht1x_defines.h.

◆ SHT1X_MEASURE_TIMEOUT

#define SHT1X_MEASURE_TIMEOUT   (1000)

Timeout for the SHT1x to complete the measurement (in millisec)

Definition at line 57 of file sht1x_defines.h.

◆ SHT1X_NO_ACK

#define SHT1X_NO_ACK   (1)

don't ack read in read_byte

Definition at line 36 of file sht1x_defines.h.

◆ SHT1X_RESET

#define SHT1X_RESET   (0x1E)

reset the sensor

Definition at line 48 of file sht1x_defines.h.

◆ SHT1X_RESET_WAIT

#define SHT1X_RESET_WAIT   (11000)

Wait 11ms after soft reset.

Definition at line 58 of file sht1x_defines.h.

◆ SHT1X_SAUL_RETRIES

#define SHT1X_SAUL_RETRIES   (3)

How often reading the sensor should be retried in case of communication failures.

Definition at line 65 of file sht1x_defines.h.

◆ SHT1X_STATUS_REG_R

#define SHT1X_STATUS_REG_R   (0x07)

will read from status register

Definition at line 45 of file sht1x_defines.h.

◆ SHT1X_STATUS_REG_W

#define SHT1X_STATUS_REG_W   (0x06)

will write to status register

Definition at line 44 of file sht1x_defines.h.