thermo24 2.0.0.0
Thermo 24 Click Driver

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

Topics

 Thermo 24 Commands List
 List of commands of Thermo 24 Click driver.
 
 Thermo 24 Registers Settings
 Settings for registers of Thermo 24 Click driver.
 
 Thermo 24 MikroBUS Map
 MikroBUS pin mapping of Thermo 24 Click driver.
 

Functions

void thermo24_cfg_setup (thermo24_cfg_t *cfg)
 Thermo 24 configuration object setup function.
 
err_t thermo24_init (thermo24_t *ctx, thermo24_cfg_t *cfg)
 Thermo 24 initialization function.
 
err_t thermo24_soft_reset (thermo24_t *ctx)
 Thermo 24 soft reset function.
 
err_t thermo24_read_serial (thermo24_t *ctx, uint32_t *serial_num)
 Thermo 24 read serial function.
 
err_t thermo24_read_temperature (thermo24_t *ctx, uint8_t precision, float *temperature)
 Thermo 24 read temperature function.
 

Detailed Description

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

◆ thermo24_cfg_setup()

void thermo24_cfg_setup ( thermo24_cfg_t * cfg)

Thermo 24 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ thermo24_init()

err_t thermo24_init ( thermo24_t * ctx,
thermo24_cfg_t * cfg )

Thermo 24 initialization function.

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

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

◆ thermo24_read_serial()

err_t thermo24_read_serial ( thermo24_t * ctx,
uint32_t * serial_num )

Thermo 24 read serial function.

This function reads the 4-byte chip serial number by using I2C serial interface.

Parameters
[in]ctx: Click context object. See thermo24_t object definition for detailed explanation.
[out]serial_num: 4-byte unique chip serial number.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ thermo24_read_temperature()

err_t thermo24_read_temperature ( thermo24_t * ctx,
uint8_t precision,
float * temperature )

Thermo 24 read temperature function.

This function reads the temperature in Celsius with the specified measurement precision.

Parameters
[in]ctx: Click context object. See thermo24_t object definition for detailed explanation.
[in]precision: Measurement precision
  • 0 - Low,
  • 1 - Medium,
  • 2 - High.
[out]temperature: Temperature in Celsius.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ thermo24_soft_reset()

err_t thermo24_soft_reset ( thermo24_t * ctx)

Thermo 24 soft reset function.

This function performs the software reset by sending the soft reset command by using I2C serial interface.

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