sht1x 2.0.0.0
Public function

Functions

void sht1x_cfg_setup (sht1x_cfg_t *cfg)
 Config Object Initialization function.
 
SHT1X_RETVAL sht1x_init (sht1x_t *ctx, sht1x_cfg_t *cfg)
 Initialization function.
 
void sht1x_output_sda (sht1x_t *ctx, sht1x_cfg_t *cfg)
 Set pin on output.
 
void sht1x_input_sda (sht1x_t *ctx, sht1x_cfg_t *cfg)
 Set pin on input.
 
void sht1x_sda_high (sht1x_t *ctx)
 Set SDA high function.
 
void sht1x_sda_low (sht1x_t *ctx)
 Set SDA low function.
 
uint8_t sht1x_get_sda (sht1x_t *ctx)
 Check SDA state function.
 
void sht1x_scl_high (sht1x_t *ctx)
 Set SCL high function.
 
void sht1x_scl_low (sht1x_t *ctx)
 Set SCL low function.
 
float sht1x_calc_temp (sht1x_t *ctx, uint16_t t)
 Calculate temperature function.
 
float sht1x_calc_humi (sht1x_t *ctx, uint16_t h, uint16_t t)
 Calculate humidity function.
 

Detailed Description

Function Documentation

◆ sht1x_calc_humi()

float sht1x_calc_humi ( sht1x_t * ctx,
uint16_t h,
uint16_t t )

Calculate humidity function.

Parameters
ctxClick object.
h12-bit value representing number of ticks
t14-bit value representing number of ticks
Returns
rh_true float value representing the humidity

@description This function is used to calculate humidity.

◆ sht1x_calc_temp()

float sht1x_calc_temp ( sht1x_t * ctx,
uint16_t t )

Calculate temperature function.

Parameters
ctxClick object.
t14-bit value representing number of ticks
Returns
tempOut float value representing the temperature

@description This function is used to calculate temperature.

◆ sht1x_cfg_setup()

void sht1x_cfg_setup ( sht1x_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ sht1x_get_sda()

uint8_t sht1x_get_sda ( sht1x_t * ctx)

Check SDA state function.

Parameters
ctxClick object.
Returns
'0' pin state is low
'1' pin state is high

What is function job.

Note
It is not necessary (only if you have specific description).

◆ sht1x_init()

SHT1X_RETVAL sht1x_init ( sht1x_t * ctx,
sht1x_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

@description This function initializes all necessary pins and peripherals used for this click.

◆ sht1x_input_sda()

void sht1x_input_sda ( sht1x_t * ctx,
sht1x_cfg_t * cfg )

Set pin on input.

Parameters
ctxClick object.
cfgClick configuration structure.

@description This function Set pin on input.

◆ sht1x_output_sda()

void sht1x_output_sda ( sht1x_t * ctx,
sht1x_cfg_t * cfg )

Set pin on output.

Parameters
ctxClick object.
cfgClick configuration structure.

@description This function sets pins on output.

◆ sht1x_scl_high()

void sht1x_scl_high ( sht1x_t * ctx)

Set SCL high function.

Parameters
ctxClick object.

@description This function is used to set state of SDA pin.

◆ sht1x_scl_low()

void sht1x_scl_low ( sht1x_t * ctx)

Set SCL low function.

Parameters
ctxClick object.

@description This function is used to set state of SDA pin.

◆ sht1x_sda_high()

void sht1x_sda_high ( sht1x_t * ctx)

Set SDA high function.

Parameters
ctxClick object.

@description This function is used to set state of SDA pin.

◆ sht1x_sda_low()

void sht1x_sda_low ( sht1x_t * ctx)

Set SDA low function.

Parameters
ctxClick object.

@description This function is used to set state of SDA pin.