thermo25 2.1.0.0
Thermo 25 Click Driver

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

Topics

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

Functions

void thermo25_cfg_setup (thermo25_cfg_t *cfg)
 Thermo 25 configuration object setup function.
 
err_t thermo25_init (thermo25_t *ctx, thermo25_cfg_t *cfg)
 Thermo 25 initialization function.
 
err_t thermo25_set_mode (thermo25_t *ctx, uint8_t mode)
 Thermo 25 set mode function.
 
err_t thermo25_read_data (thermo25_t *ctx, uint16_t *data_out)
 Thermo 25 read data function.
 
err_t thermo25_check_communication (thermo25_t *ctx)
 Thermo 25 check communication function.
 
err_t thermo25_read_temperature (thermo25_t *ctx, float *temperature)
 Thermo 25 read temperature function.
 

Detailed Description

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

◆ thermo25_cfg_setup()

void thermo25_cfg_setup ( thermo25_cfg_t * cfg)

Thermo 25 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ thermo25_check_communication()

err_t thermo25_check_communication ( thermo25_t * ctx)

Thermo 25 check communication function.

This function sets the operating mode to shutdown, then reads and verifies the device ID, and switches back to the continuous mode.

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

◆ thermo25_init()

err_t thermo25_init ( thermo25_t * ctx,
thermo25_cfg_t * cfg )

Thermo 25 initialization function.

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

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

◆ thermo25_read_data()

err_t thermo25_read_data ( thermo25_t * ctx,
uint16_t * data_out )

Thermo 25 read data function.

This function reads 16-bit data and keeps the previously set operating mode unchanged by using SPI serial interface.

Parameters
[in]ctx: Click context object. See thermo25_t object definition for detailed explanation.
[out]data_out: Output read data.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ thermo25_read_temperature()

err_t thermo25_read_temperature ( thermo25_t * ctx,
float * temperature )

Thermo 25 read temperature function.

This function reads the temperature measurements in degrees Celsius.

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

◆ thermo25_set_mode()

err_t thermo25_set_mode ( thermo25_t * ctx,
uint8_t mode )

Thermo 25 set mode function.

This function sets the device operating mode to shutdown or continuous mode by using SPI serial interface.

Parameters
[in]ctx: Click context object. See thermo25_t object definition for detailed explanation.
[in]mode: Device operating mode
  • 0x00 - Continuous,
  • 0xFF - Shutdown.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.