irthermo4 2.2.0
Loading...
Searching...
No Matches
IR Thermo 4 Click Driver

API for configuring and manipulating IR Thermo 4 Click driver. More...

Topics

 IR Thermo 4 Registers List
 List of registers of IR Thermo 4 Click driver.
 IR Thermo 4 Registers Settings
 Settings for registers of IR Thermo 4 Click driver.
 IR Thermo 4 MikroBUS Map
 MikroBUS pin mapping of IR Thermo 4 Click driver.

Functions

void irthermo4_cfg_setup (irthermo4_cfg_t *cfg)
 IR Thermo 4 configuration object setup function.
err_t irthermo4_init (irthermo4_t *ctx, irthermo4_cfg_t *cfg)
 IR Thermo 4 initialization function.
err_t irthermo4_default_cfg (irthermo4_t *ctx)
 IR Thermo 4 default configuration function.
err_t irthermo4_write_regs (irthermo4_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 IR Thermo 4 write regs function.
err_t irthermo4_read_regs (irthermo4_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 IR Thermo 4 read regs function.
err_t irthermo4_write_reg (irthermo4_t *ctx, uint8_t reg, uint8_t data_in)
 IR Thermo 4 write reg function.
err_t irthermo4_read_reg (irthermo4_t *ctx, uint8_t reg, uint8_t *data_out)
 IR Thermo 4 read reg function.
err_t irthermo4_refresh_address (irthermo4_t *ctx)
 IR Thermo 4 refresh address function.
err_t irthermo4_read_eeprom (irthermo4_t *ctx)
 IR Thermo 4 read EEPROM function.
uint8_t irthermo4_get_int_pin (irthermo4_t *ctx)
 IR Thermo 4 get int pin function.
err_t irthermo4_read_ambient_temp (irthermo4_t *ctx, float *t_amb)
 IR Thermo 4 read ambient temp function.
err_t irthermo4_read_object_temp (irthermo4_t *ctx, float *t_obj, float t_amb)
 IR Thermo 4 read object temp function.

Detailed Description

API for configuring and manipulating IR Thermo 4 Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ irthermo4_cfg_setup()

void irthermo4_cfg_setup ( irthermo4_cfg_t * cfg)

IR Thermo 4 configuration object setup function.

This function initializes Click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See irthermo4_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ irthermo4_default_cfg()

err_t irthermo4_default_cfg ( irthermo4_t * ctx)

IR Thermo 4 default configuration function.

This function executes a default configuration of IR Thermo 4 Click board.

Parameters
[in]ctx: Click context object. See irthermo4_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ irthermo4_get_int_pin()

uint8_t irthermo4_get_int_pin ( irthermo4_t * ctx)

IR Thermo 4 get int pin function.

This function returns the INT pin logic state.

Parameters
[in]ctx: Click context object. See irthermo4_t object definition for detailed explanation.
Returns
Pin logic state.
Note
None.

◆ irthermo4_init()

err_t irthermo4_init ( irthermo4_t * ctx,
irthermo4_cfg_t * cfg )

IR Thermo 4 initialization function.

This function initializes all necessary pins and peripherals used for this Click board.

Parameters
[out]ctx: Click context object. See irthermo4_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See irthermo4_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ irthermo4_read_ambient_temp()

err_t irthermo4_read_ambient_temp ( irthermo4_t * ctx,
float * t_amb )

IR Thermo 4 read ambient temp function.

This function reads and calculates the ambient temperature in degrees Celsius.

Parameters
[in]ctx: Click context object. See irthermo4_t object definition for detailed explanation.
[out]t_amb: Calculated ambient temperature in degrees Celsius.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ irthermo4_read_eeprom()

err_t irthermo4_read_eeprom ( irthermo4_t * ctx)

IR Thermo 4 read EEPROM function.

This function reads the content of EEPROM and stores it in a Click context object.

Parameters
[in]ctx: Click context object. See irthermo4_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ irthermo4_read_object_temp()

err_t irthermo4_read_object_temp ( irthermo4_t * ctx,
float * t_obj,
float t_amb )

IR Thermo 4 read object temp function.

This function reads and calculates the object temperature in degrees Celsius.

Parameters
[in]ctx: Click context object. See irthermo4_t object definition for detailed explanation.
[out]t_obj: Calculated object temperature in degrees Celsius.
[in]t_amb: Ambient temperature in degrees Celsius (required for the object temperature calculation).
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ irthermo4_read_reg()

err_t irthermo4_read_reg ( irthermo4_t * ctx,
uint8_t reg,
uint8_t * data_out )

IR Thermo 4 read reg function.

This function reads a data byte from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See irthermo4_t object definition for detailed explanation.
[in]reg: Register address.
[out]data_out: Output read data.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ irthermo4_read_regs()

err_t irthermo4_read_regs ( irthermo4_t * ctx,
uint8_t reg,
uint8_t * data_out,
uint8_t len )

IR Thermo 4 read regs function.

This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See irthermo4_t object definition for detailed explanation.
[in]reg: Start register address.
[out]data_out: Output read data.
[in]len: Number of bytes to be read.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ irthermo4_refresh_address()

err_t irthermo4_refresh_address ( irthermo4_t * ctx)

IR Thermo 4 refresh address function.

This function reloads the slave address from the EEPROM by issuing the general call command.

Parameters
[in]ctx: Click context object. See irthermo4_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ irthermo4_write_reg()

err_t irthermo4_write_reg ( irthermo4_t * ctx,
uint8_t reg,
uint8_t data_in )

IR Thermo 4 write reg function.

This function writes a data byte to the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See irthermo4_t object definition for detailed explanation.
[in]reg: Register address.
[in]data_in: Data to be written.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ irthermo4_write_regs()

err_t irthermo4_write_regs ( irthermo4_t * ctx,
uint8_t reg,
uint8_t * data_in,
uint8_t len )

IR Thermo 4 write regs function.

This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See irthermo4_t object definition for detailed explanation.
[in]reg: Start register address.
[in]data_in: Data to be written.
[in]len: Number of bytes to be written.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.