thermo22 2.0.0.0
Thermo 22 Click Driver

API for configuring and manipulating Thermo 22 Click driver. More...

Topics

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

Functions

void thermo22_cfg_setup (thermo22_cfg_t *cfg)
 Thermo 22 configuration object setup function.
 
err_t thermo22_init (thermo22_t *ctx, thermo22_cfg_t *cfg)
 Thermo 22 initialization function.
 
err_t thermo22_default_cfg (thermo22_t *ctx)
 Thermo 22 default configuration function.
 
err_t thermo22_write_config (thermo22_t *ctx, uint8_t config)
 Thermo 22 write config function.
 
err_t thermo22_read_config (thermo22_t *ctx, uint8_t *config)
 Thermo 22 read config function.
 
err_t thermo22_read_temperature (thermo22_t *ctx, float *temperature)
 Thermo 22 read temperature function.
 
err_t thermo22_set_temperature_low_limit (thermo22_t *ctx, float low_limit)
 Thermo 22 set temperature low limit function.
 
err_t thermo22_set_temperature_high_limit (thermo22_t *ctx, float high_limit)
 Thermo 22 set temperature high limit function.
 
uint8_t thermo22_get_int_pin (thermo22_t *ctx)
 Thermo 22 get int pin function.
 

Detailed Description

API for configuring and manipulating Thermo 22 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

◆ thermo22_cfg_setup()

void thermo22_cfg_setup ( thermo22_cfg_t * cfg)

Thermo 22 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ thermo22_default_cfg()

err_t thermo22_default_cfg ( thermo22_t * ctx)

Thermo 22 default configuration function.

This function executes a default configuration of Thermo 22 click board.

Parameters
[in]ctx: Click context object. See thermo22_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.

◆ thermo22_get_int_pin()

uint8_t thermo22_get_int_pin ( thermo22_t * ctx)

Thermo 22 get int pin function.

This function returns the INT pin logic state which indicates the overtemperature alert.

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

◆ thermo22_init()

err_t thermo22_init ( thermo22_t * ctx,
thermo22_cfg_t * cfg )

Thermo 22 initialization function.

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

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

◆ thermo22_read_config()

err_t thermo22_read_config ( thermo22_t * ctx,
uint8_t * config )

Thermo 22 read config function.

This function reads a config byte from the desired config register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See thermo22_t object definition for detailed explanation.
[out]config: Config byte read.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ thermo22_read_temperature()

err_t thermo22_read_temperature ( thermo22_t * ctx,
float * temperature )

Thermo 22 read temperature function.

This function reads the temperature data in Celsius.

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

◆ thermo22_set_temperature_high_limit()

err_t thermo22_set_temperature_high_limit ( thermo22_t * ctx,
float high_limit )

Thermo 22 set temperature high limit function.

This function sets the temperature high limit at which the overtemperature alert flag is being set.

Parameters
[in]ctx: Click context object. See thermo22_t object definition for detailed explanation.
[out]high_limit: Temperature high limit in Celsius.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ thermo22_set_temperature_low_limit()

err_t thermo22_set_temperature_low_limit ( thermo22_t * ctx,
float low_limit )

Thermo 22 set temperature low limit function.

This function sets the temperature low limit at which the overtemperature alert flag is being cleared.

Parameters
[in]ctx: Click context object. See thermo22_t object definition for detailed explanation.
[out]low_limit: Temperature low limit in Celsius.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ thermo22_write_config()

err_t thermo22_write_config ( thermo22_t * ctx,
uint8_t config )

Thermo 22 write config function.

This function writes a config byte to the desired config register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See thermo22_t object definition for detailed explanation.
[in]config: Config byte to be written.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.