38 #include "drv_digital_out.h" 39 #include "drv_digital_in.h" 51 #define SHT1X_MAP_MIKROBUS( cfg, mikrobus ) \ 52 cfg.scl= MIKROBUS( mikrobus, MIKROBUS_SCL ); \ 53 cfg.sda= MIKROBUS( mikrobus, MIKROBUS_SDA ) 61 #define SHT1X_RETVAL uint8_t 64 #define SHT1X_INIT_ERROR 0xFF 71 #define SHT1X_MEAS_TEMP 0x03 72 #define SHT1X_MEAS_HUMI 0x05 73 #define SHT1X_STAT_REG_W 0x06 74 #define SHT1X_STAT_REG_R 0x07 75 #define SHT1X_SOFT_RESET 0x1E 82 #define SHT1X_SR_MASK 0x07 97 #define SHT1X_D1 -40.1 98 #define SHT1X_D2h 0.01 99 #define SHT1X_D2l 0.04 100 #define SHT1X_V3_C1 -4.0000 101 #define SHT1X_V3_C2h 0.0405 102 #define SHT1X_V3_C3h -2.8000E-6 103 #define SHT1X_V3_C2l 0.6480 104 #define SHT1X_V3_C3l -7.2000E-4 105 #define SHT1X_V4_C1 -2.0468 106 #define SHT1X_V4_C2h 0.0367 107 #define SHT1X_V4_C3h -1.5955E-6 108 #define SHT1X_V4_C2l 0.5872 109 #define SHT1X_V4_C3l -4.0845E-4 110 #define SHT1X_T1 0.01 111 #define SHT1X_T2h 0.00008 112 #define SHT1X_T2l 0.00128 #define SHT1X_RETVAL
Definition: sht1x.h:61
float sht1x_calc_temp(sht1x_t *ctx, uint16_t t)
Calculate temperature function.
uint8_t sht1x_get_sda(sht1x_t *ctx)
Check SDA state function.
digital_out_t sda
Definition: sht1x.h:132
SHT1X_RETVAL sht1x_init(sht1x_t *ctx, sht1x_cfg_t *cfg)
Initialization function.
digital_out_t scl
Definition: sht1x.h:131
void sht1x_scl_low(sht1x_t *ctx)
Set SCL low function.
float sht1x_calc_humi(sht1x_t *ctx, uint16_t h, uint16_t t)
Calculate humidity function.
pin_name_t sda
Definition: sht1x.h:144
void sht1x_sda_low(sht1x_t *ctx)
Set SDA low function.
Click configuration structure definition.
Definition: sht1x.h:139
void sht1x_sda_high(sht1x_t *ctx)
Set SDA high function.
void sht1x_scl_high(sht1x_t *ctx)
Set SCL high function.
Click ctx object definition.
Definition: sht1x.h:127
void sht1x_cfg_setup(sht1x_cfg_t *cfg)
Config Object Initialization function.
pin_name_t scl
Definition: sht1x.h:143
void sht1x_input_sda(sht1x_t *ctx, sht1x_cfg_t *cfg)
Set pin on input.
void sht1x_output_sda(sht1x_t *ctx, sht1x_cfg_t *cfg)
Set pin on output.