thermok3 2.1.0.0
Thermo K 3 Click Driver

API for configuring and manipulating Thermo K 3 Click driver. More...

Topics

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

Functions

void thermok3_cfg_setup (thermok3_cfg_t *cfg)
 Thermo K 3 configuration object setup function.
 
err_t thermok3_init (thermok3_t *ctx, thermok3_cfg_t *cfg)
 Thermo K 3 initialization function.
 
err_t thermok3_read_data (thermok3_t *ctx, uint16_t *data_out)
 Thermo K 3 read data function.
 
err_t thermok3_read_temperature (thermok3_t *ctx, float *temperature)
 Thermo K 3 read temperature function.
 

Detailed Description

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

◆ thermok3_cfg_setup()

void thermok3_cfg_setup ( thermok3_cfg_t * cfg)

Thermo K 3 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ thermok3_init()

err_t thermok3_init ( thermok3_t * ctx,
thermok3_cfg_t * cfg )

Thermo K 3 initialization function.

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

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

◆ thermok3_read_data()

err_t thermok3_read_data ( thermok3_t * ctx,
uint16_t * data_out )

Thermo K 3 read data function.

This function reads a raw data output by using the SPI serial interface.

Parameters
[in]ctx: Click context object. See thermok3_t object definition for detailed explanation.
[out]data_out: 12-bit raw data output.
Returns
  • 0 - Success,
  • -1 - Error,
  • -2 - No thermocouple input. See #err_t definition for detailed explanation.
Note
None.

◆ thermok3_read_temperature()

err_t thermok3_read_temperature ( thermok3_t * ctx,
float * temperature )

Thermo K 3 read temperature function.

This function reads a raw data output and converts it to temperature in Celsius.

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