temphum4 2.0.0.0

Functions

void temphum4_cfg_setup (temphum4_cfg_t *cfg)
 Config Object Initialization function.
 
TEMPHUM4_RETVAL temphum4_init (temphum4_t *ctx, temphum4_cfg_t *cfg)
 Initialization function.
 
void temphum4_default_cfg (temphum4_t *ctx)
 Click Default Configuration function.
 
void temphum4_generic_write (temphum4_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void temphum4_generic_read (temphum4_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void temphum4_set_mode (temphum4_t *ctx, uint8_t value)
 Set device mode function.
 
uint16_t temphum4_get_manifacturer_id (temphum4_t *ctx)
 Get manufacturer's id.
 
uint16_t temphum4_get_device_id (temphum4_t *ctx)
 Get device id.
 
void temphum4_configuration (temphum4_t *ctx, uint16_t conf_data)
 Set device configuration function.
 
float temphum4_get_temperature (temphum4_t *ctx)
 Get temperature function.
 
float temphum4_get_humidity (temphum4_t *ctx)
 Get humidity function.
 

Detailed Description

Function Documentation

◆ temphum4_cfg_setup()

void temphum4_cfg_setup ( temphum4_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.

◆ temphum4_configuration()

void temphum4_configuration ( temphum4_t * ctx,
uint16_t conf_data )

Set device configuration function.

Parameters
ctxClick object.
conf_dataConfiguration data values

@description This function sets device configuration registers

◆ temphum4_default_cfg()

void temphum4_default_cfg ( temphum4_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for Temp&Hum4 click.

◆ temphum4_generic_read()

void temphum4_generic_read ( temphum4_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic read function.

Parameters
ctxClick object.
regRegister address.
data_bufOutput data buf
lenNumber of the bytes to be read

@description This function reads data from the desired register.

◆ temphum4_generic_write()

void temphum4_generic_write ( temphum4_t * ctx,
uint8_t reg,
uint8_t * data_buf,
uint8_t len )

Generic write function.

Parameters
ctxClick object.
regRegister address.
data_bufData buf to be written.
lenNumber of the bytes in data buf.

@description This function writes data to the desired register.

◆ temphum4_get_device_id()

uint16_t temphum4_get_device_id ( temphum4_t * ctx)

Get device id.

Parameters
ctxClick object.

@description This function gets device id from the device.

◆ temphum4_get_humidity()

float temphum4_get_humidity ( temphum4_t * ctx)

Get humidity function.

Parameters
ctxClick object.

@description This function reads humidity data from the module.

◆ temphum4_get_manifacturer_id()

uint16_t temphum4_get_manifacturer_id ( temphum4_t * ctx)

Get manufacturer's id.

Parameters
ctxClick object.

@description This function gets manifacturer's id from the device.

◆ temphum4_get_temperature()

float temphum4_get_temperature ( temphum4_t * ctx)

Get temperature function.

Parameters
ctxClick object.

@description This function reads temperature data from the module.

◆ temphum4_init()

TEMPHUM4_RETVAL temphum4_init ( temphum4_t * ctx,
temphum4_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ temphum4_set_mode()

void temphum4_set_mode ( temphum4_t * ctx,
uint8_t value )

Set device mode function.

Parameters
ctxClick object.
valueDevice mode value.

@description This function sets device mode.