irthermo2 2.0.0.0
|
API for configuring and manipulating IrThermo 2 Click driver. More...
Topics | |
IrThermo 2 Registers List | |
List of registers of IrThermo 2 Click driver. | |
IrThermo 2 Registers Settings | |
Settings for registers of IrThermo 2 Click driver. | |
IrThermo 2 MikroBUS Map | |
MikroBUS pin mapping of IrThermo 2 Click driver. | |
Functions | |
void | irthermo2_cfg_setup (irthermo2_cfg_t *cfg) |
Config Object Initialization function. | |
err_t | irthermo2_init (irthermo2_t *ctx, irthermo2_cfg_t *cfg) |
Initialization function. | |
void | irthermo2_default_cfg (irthermo2_t *ctx) |
Click Default Configuration function. | |
void | irthermo2_generic_write (irthermo2_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Generic write function. | |
void | irthermo2_generic_read (irthermo2_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Generic read function. | |
void | irthermo2_write_data (irthermo2_t *ctx, uint8_t address, uint16_t write_data) |
Generic write 16-bit data function. | |
uint16_t | irthermo2_read_data (irthermo2_t *ctx, uint8_t address) |
Generic read 16-bit data from 8-bit address function. | |
err_t | irthermo2_check_id (irthermo2_t *ctx) |
Check device ID function. | |
float | irthermo2_get_object_temperature_c (irthermo2_t *ctx) |
Get object temperature in degrees Celsius function. | |
float | irthermo2_get_object_temperature_f (irthermo2_t *ctx) |
Get object temperature in degrees Fahrenheit function. | |
float | irthermo2_get_raw_temperature (irthermo2_t *ctx) |
Get raw temperature in degrees Celsius function. | |
uint8_t | irhhermo2_get_alert (irthermo2_t *ctx) |
Get state of alert function. | |
API for configuring and manipulating IrThermo 2 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
uint8_t irhhermo2_get_alert | ( | irthermo2_t * | ctx | ) |
Get state of alert function.
Function get state of alert - INT pin of TMP007 sesnor on IrThermo 2 Click.
[in] | ctx | : Click context object. See irthermo2_t object definition for detailed explanation. |
void irthermo2_cfg_setup | ( | irthermo2_cfg_t * | cfg | ) |
Config Object Initialization function.
This function initializes click configuration structure to init state.
[out] | cfg | : Click configuration structure. See irthermo2_cfg_t object definition for detailed explanation. |
err_t irthermo2_check_id | ( | irthermo2_t * | ctx | ) |
Check device ID function.
Function check device ID and return ERROR or OK.
[in] | ctx | : Click context object. See irthermo2_t object definition for detailed explanation. |
0
- Success, -1
- Error.void irthermo2_default_cfg | ( | irthermo2_t * | ctx | ) |
Click Default Configuration function.
This function executes default configuration for IrThermo2 click.
[out] | ctx | : Click context object. See irthermo2_t object definition for detailed explanation. |
void irthermo2_generic_read | ( | irthermo2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
Generic read function.
This function reads data from the desired register.
[in] | ctx | : Click context object. See irthermo2_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. |
void irthermo2_generic_write | ( | irthermo2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
Generic write function.
This function writes data to the desired register.
[in] | ctx | : Click context object. See irthermo2_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. |
float irthermo2_get_object_temperature_c | ( | irthermo2_t * | ctx | ) |
Get object temperature in degrees Celsius function.
Function read 16-bit data from object temperature register and calculate temperature in degrees Celsius.
[in] | ctx | : Click context object. See irthermo2_t object definition for detailed explanation. |
float irthermo2_get_object_temperature_f | ( | irthermo2_t * | ctx | ) |
Get object temperature in degrees Fahrenheit function.
Function read 16-bit data from object temperature register and calculate temperature in degrees Fahrenheit.
[in] | ctx | : Click context object. See irthermo2_t object definition for detailed explanation. |
float irthermo2_get_raw_temperature | ( | irthermo2_t * | ctx | ) |
Get raw temperature in degrees Celsius function.
Function read 16-bit data from raw temperature register and calculate temperature in degrees Celsius.
[in] | ctx | : Click context object. See irthermo2_t object definition for detailed explanation. |
err_t irthermo2_init | ( | irthermo2_t * | ctx, |
irthermo2_cfg_t * | cfg ) |
Initialization function.
This function initializes all necessary pins and peripherals used for this click.
[out] | ctx | : Click context object. See irthermo2_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See irthermo2_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.uint16_t irthermo2_read_data | ( | irthermo2_t * | ctx, |
uint8_t | address ) |
Generic read 16-bit data from 8-bit address function.
Function read 16-bit data from given 8-bit register address.
[in] | ctx | : Click context object. See irthermo2_t object definition for detailed explanation. |
[in] | address | : 8-bit register address. |
void irthermo2_write_data | ( | irthermo2_t * | ctx, |
uint8_t | address, | ||
uint16_t | write_data ) |
Generic write 16-bit data function.
Function write 16-bit data to given 8-bit register address.
[in] | ctx | : Click context object. See irthermo2_t object definition for detailed explanation. |
[in] | address | : 8-bit register address. |
[in] | write_command | : 16-bit data to write to given address. |