thermo28 2.1.0.0
Thermo 28 Click Driver

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

Topics

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

Functions

void thermo28_cfg_setup (thermo28_cfg_t *cfg)
 Thermo 28 configuration object setup function.
 
err_t thermo28_init (thermo28_t *ctx, thermo28_cfg_t *cfg)
 Thermo 28 initialization function.
 
err_t thermo28_default_cfg (thermo28_t *ctx)
 Thermo 28 default configuration function.
 
err_t thermo28_generic_write (thermo28_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len)
 Thermo 28 I2C writing function.
 
err_t thermo28_generic_read (thermo28_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len)
 Thermo 28 I2C reading function.
 
err_t thermo28_get_temperature (thermo28_t *ctx, float *temperature)
 Thermo 28 get temperature function.
 
err_t thermo28_set_alert_limits (thermo28_t *ctx, float alert_min, float alert_max)
 Thermo 28 set alert limits function.
 
err_t thermo28_set_config (thermo28_t *ctx, thermo28_config_t config)
 Thermo 28 set configuration function.
 
err_t thermo28_set_continuous_conversion (thermo28_t *ctx)
 Thermo 28 set continuous conversion function.
 
err_t thermo28_set_sleep_mode (thermo28_t *ctx)
 Thermo 28 set device working mode function.
 
err_t thermo28_set_trigger_single_shot (thermo28_t *ctx)
 Thermo 28 set trigger single-shot function.
 
uint8_t thermo28_get_int_pin (thermo28_t *ctx)
 Thermo 28 set alert status function.
 

Detailed Description

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

◆ thermo28_cfg_setup()

void thermo28_cfg_setup ( thermo28_cfg_t * cfg)

Thermo 28 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ thermo28_default_cfg()

err_t thermo28_default_cfg ( thermo28_t * ctx)

Thermo 28 default configuration function.

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

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

◆ thermo28_generic_read()

err_t thermo28_generic_read ( thermo28_t * ctx,
uint8_t reg,
uint8_t * data_out,
uint8_t len )

Thermo 28 I2C reading 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 thermo28_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.

◆ thermo28_generic_write()

err_t thermo28_generic_write ( thermo28_t * ctx,
uint8_t reg,
uint8_t * data_in,
uint8_t len )

Thermo 28 I2C writing 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 thermo28_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.

◆ thermo28_get_int_pin()

uint8_t thermo28_get_int_pin ( thermo28_t * ctx)

Thermo 28 set alert status function.

This function gets alert status by reading the states of the INT pin of the Thermo 28 click board™.

Parameters
[in]ctx: Click context object. See thermo28_t object definition for detailed explanation.
Returns
  • 0 - Low pin state,
  • 1 - High pin state.
Note
None.

◆ thermo28_get_temperature()

err_t thermo28_get_temperature ( thermo28_t * ctx,
float * temperature )

Thermo 28 get temperature function.

This function reads the temperature raw data measurements and converts them to degrees Celsius.

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

◆ thermo28_init()

err_t thermo28_init ( thermo28_t * ctx,
thermo28_cfg_t * cfg )

Thermo 28 initialization function.

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

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

◆ thermo28_set_alert_limits()

err_t thermo28_set_alert_limits ( thermo28_t * ctx,
float alert_min,
float alert_max )

Thermo 28 set alert limits function.

This function sets temperature alert limits values.

Parameters
[in]ctx: Click context object. See thermo28_t object definition for detailed explanation.
[in]alert_min: Minimum temperature alert limit in degrees Celsius.
[in]alert_max: Maximum temperature alert limit in degrees Celsius.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ thermo28_set_config()

err_t thermo28_set_config ( thermo28_t * ctx,
thermo28_config_t config )

Thermo 28 set configuration function.

This function executes a configuration of the AS6221 Digital Temperature Sensor on the Thermo 28 click board™.

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

◆ thermo28_set_continuous_conversion()

err_t thermo28_set_continuous_conversion ( thermo28_t * ctx)

Thermo 28 set continuous conversion function.

This function executes a configuration of the continuous conversion on the Thermo 28 click board™.

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

◆ thermo28_set_sleep_mode()

err_t thermo28_set_sleep_mode ( thermo28_t * ctx)

Thermo 28 set device working mode function.

This function executes a configuration of the device's working mode on the Thermo 28 click board™.

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

◆ thermo28_set_trigger_single_shot()

err_t thermo28_set_trigger_single_shot ( thermo28_t * ctx)

Thermo 28 set trigger single-shot function.

This function executes a trigger single-shot mode on the Thermo 28 click board™.

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