|
irthermo4 2.2.0
|
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. | |
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.
| void irthermo4_cfg_setup | ( | irthermo4_cfg_t * | cfg | ) |
IR Thermo 4 configuration object setup function.
This function initializes Click configuration structure to initial values.
| [out] | cfg | : Click configuration structure. See irthermo4_cfg_t object definition for detailed explanation. |
| 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.
| [in] | ctx | : Click context object. See irthermo4_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | uint8_t irthermo4_get_int_pin | ( | irthermo4_t * | ctx | ) |
IR Thermo 4 get int pin function.
This function returns the INT pin logic state.
| [in] | ctx | : Click context object. See irthermo4_t object definition for detailed explanation. |
| 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.
| [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. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | 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.
| [in] | ctx | : Click context object. See irthermo4_t object definition for detailed explanation. |
| [out] | t_amb | : Calculated ambient temperature in degrees Celsius. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | 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.
| [in] | ctx | : Click context object. See irthermo4_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | 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.
| [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). |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | 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.
| [in] | ctx | : Click context object. See irthermo4_t object definition for detailed explanation. |
| [in] | reg | : Register address. |
| [out] | data_out | : Output read data. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | 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.
| [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. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | 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.
| [in] | ctx | : Click context object. See irthermo4_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | 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.
| [in] | ctx | : Click context object. See irthermo4_t object definition for detailed explanation. |
| [in] | reg | : Register address. |
| [in] | data_in | : Data to be written. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | 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.
| [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. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation.