temphum4  2.0.0.0
Functions

Functions

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

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.