irthermo3  2.0.0.0
Functions

Functions

void irthermo3_cfg_setup (irthermo3_cfg_t *cfg)
 Config Object Initialization function. More...
 
IRTHERMO3_RETVAL irthermo3_init (irthermo3_t *ctx, irthermo3_cfg_t *cfg)
 Initialization function. More...
 
void irthermo3_default_cfg (irthermo3_t *ctx)
 Click Default Configuration function. More...
 
void irthermo3_generic_write (irthermo3_t *ctx, uint16_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function. More...
 
void irthermo3_generic_read (irthermo3_t *ctx, uint16_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function. More...
 
void irthermo3_write_u16 (irthermo3_t *ctx, uint16_t reg, uint16_t wr_data)
 Write u16 data function. More...
 
int16_t irthermo3_read_i16 (irthermo3_t *ctx, uint16_t reg)
 Read i16 dat function. More...
 
int32_t irthermo3_read_i32 (irthermo3_t *ctx, uint16_t reg)
 Read i32 dat function. More...
 
void irthermo3_global_write (irthermo3_t *ctx, uint8_t *data_buf, uint8_t len)
 Global write function. More...
 
void irthermo3_set_mode (irthermo3_t *ctx, uint8_t mode)
 Set device mode function. More...
 
void irthermo3_cal (irthermo3_t *ctx)
 Calibration function. More...
 
float irthermo3_get_ambient_temperature (irthermo3_t *ctx)
 Read Ambient Temperature function. More...
 
float irthermo3_get_object_temperature (irthermo3_t *ctx)
 Read Object Temperature function. More...
 

Detailed Description

Function Documentation

◆ irthermo3_cal()

void irthermo3_cal ( irthermo3_t ctx)

Calibration function.

Parameters
ctxClick object.

@description Function is used to calibrate the device.

Note
This function must be used at least once in order to get correct readings!

◆ irthermo3_cfg_setup()

void irthermo3_cfg_setup ( irthermo3_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.

◆ irthermo3_default_cfg()

void irthermo3_default_cfg ( irthermo3_t ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for IrThermo3 click.

◆ irthermo3_generic_read()

void irthermo3_generic_read ( irthermo3_t ctx,
uint16_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.

◆ irthermo3_generic_write()

void irthermo3_generic_write ( irthermo3_t ctx,
uint16_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.

◆ irthermo3_get_ambient_temperature()

float irthermo3_get_ambient_temperature ( irthermo3_t ctx)

Read Ambient Temperature function.

Return values
-Ambient temperature.

@description Function is used to read ambient temperature.

◆ irthermo3_get_object_temperature()

float irthermo3_get_object_temperature ( irthermo3_t ctx)

Read Object Temperature function.

Return values
-Object temperature.

@description Function is used to read object temperature.

◆ irthermo3_global_write()

void irthermo3_global_write ( irthermo3_t ctx,
uint8_t *  data_buf,
uint8_t  len 
)

Global write function.

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

@description This function writes data to the addressed device.

Note
This function is used exclusively to perform Addressed reset ( which resets the device ) or EEPROM unlock (for customer access) on slave address defined device

◆ irthermo3_init()

IRTHERMO3_RETVAL irthermo3_init ( irthermo3_t ctx,
irthermo3_cfg_t cfg 
)

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ irthermo3_read_i16()

int16_t irthermo3_read_i16 ( irthermo3_t ctx,
uint16_t  reg 
)

Read i16 dat function.

Parameters
ctxClick object.
regRegister address.
Return values
ret_valtwo bytes signed data which is read from the address.

@description This function reads signed data from the desired register.

◆ irthermo3_read_i32()

int32_t irthermo3_read_i32 ( irthermo3_t ctx,
uint16_t  reg 
)

Read i32 dat function.

Parameters
ctxClick object.
regRegister address.
Return values
ret_valfour bytes signed data which is read from the address.

@description This function reads signed data from the desired register.

◆ irthermo3_set_mode()

void irthermo3_set_mode ( irthermo3_t ctx,
uint8_t  mode 
)

Set device mode function.

Parameters
ctxClick object.
modeMode to be set.

@description This function is used to set the devices mode to sleep, step mode or continuous mode.

◆ irthermo3_write_u16()

void irthermo3_write_u16 ( irthermo3_t ctx,
uint16_t  reg,
uint16_t  wr_data 
)

Write u16 data function.

Parameters
ctxClick object.
regRegister address.
wr_dataData to be written.

@description This function writes data to the desired register.