Go to the documentation of this file.
38 #include "mikrosdk_version.h"
41 #if mikroSDK_GET_VERSION < 20800ul
42 #include "rcu_delays.h"
48 #include "drv_digital_out.h"
49 #include "drv_digital_in.h"
61 #define SHT1X_MAP_MIKROBUS( cfg, mikrobus ) \
62 cfg.scl= MIKROBUS( mikrobus, MIKROBUS_SCL ); \
63 cfg.sda= MIKROBUS( mikrobus, MIKROBUS_SDA )
71 #define SHT1X_RETVAL uint8_t
74 #define SHT1X_INIT_ERROR 0xFF
81 #define SHT1X_MEAS_TEMP 0x03
82 #define SHT1X_MEAS_HUMI 0x05
83 #define SHT1X_STAT_REG_W 0x06
84 #define SHT1X_STAT_REG_R 0x07
85 #define SHT1X_SOFT_RESET 0x1E
92 #define SHT1X_SR_MASK 0x07
107 #define SHT1X_D1 -40.1
108 #define SHT1X_D2h 0.01
109 #define SHT1X_D2l 0.04
110 #define SHT1X_V3_C1 -4.0000
111 #define SHT1X_V3_C2h 0.0405
112 #define SHT1X_V3_C3h -2.8000E-6
113 #define SHT1X_V3_C2l 0.6480
114 #define SHT1X_V3_C3l -7.2000E-4
115 #define SHT1X_V4_C1 -2.0468
116 #define SHT1X_V4_C2h 0.0367
117 #define SHT1X_V4_C3h -1.5955E-6
118 #define SHT1X_V4_C2l 0.5872
119 #define SHT1X_V4_C3l -4.0845E-4
120 #define SHT1X_T1 0.01
121 #define SHT1X_T2h 0.00008
122 #define SHT1X_T2l 0.00128
void sht1x_scl_low(sht1x_t *ctx)
Set SCL low function.
float sht1x_calc_temp(sht1x_t *ctx, uint16_t t)
Calculate temperature function.
void sht1x_output_sda(sht1x_t *ctx, sht1x_cfg_t *cfg)
Set pin on output.
SHT1X_RETVAL sht1x_init(sht1x_t *ctx, sht1x_cfg_t *cfg)
Initialization function.
pin_name_t sda
Definition: sht1x.h:154
uint8_t sht1x_get_sda(sht1x_t *ctx)
Check SDA state function.
#define SHT1X_RETVAL
Definition: sht1x.h:71
void sht1x_cfg_setup(sht1x_cfg_t *cfg)
Config Object Initialization function.
void sht1x_sda_high(sht1x_t *ctx)
Set SDA high function.
void sht1x_scl_high(sht1x_t *ctx)
Set SCL high function.
float sht1x_calc_humi(sht1x_t *ctx, uint16_t h, uint16_t t)
Calculate humidity function.
void sht1x_sda_low(sht1x_t *ctx)
Set SDA low function.
Click configuration structure definition.
Definition: sht1x.h:150
pin_name_t scl
Definition: sht1x.h:153
void sht1x_input_sda(sht1x_t *ctx, sht1x_cfg_t *cfg)
Set pin on input.
digital_out_t sda
Definition: sht1x.h:142
Click ctx object definition.
Definition: sht1x.h:138
digital_out_t scl
Definition: sht1x.h:141