thermo23 2.0.0.0
Thermo 23 Click Driver

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

Topics

 Thermo 23 Device Settings
 Settings for registers of Thermo 23 Click driver.
 
 Thermo 23 MikroBUS Map
 MikroBUS pin mapping of Thermo 23 Click driver.
 

Functions

void thermo23_cfg_setup (thermo23_cfg_t *cfg)
 Thermo 23 configuration object setup function.
 
err_t thermo23_init (thermo23_t *ctx, thermo23_cfg_t *cfg)
 Thermo 23 initialization function.
 
err_t thermo23_default_cfg (thermo23_t *ctx)
 Thermo 23 default configuration function.
 
err_t thermo23_write_command (thermo23_t *ctx, uint8_t cmd, uint16_t data_in)
 Thermo 23 write command function.
 
err_t thermo23_read_command (thermo23_t *ctx, uint8_t cmd, uint16_t *data_out)
 Thermo 23 read command function.
 
err_t thermo23_set_config (thermo23_t *ctx, uint16_t config)
 Thermo 23 set config function.
 
err_t thermo23_read_temperature (thermo23_t *ctx, float *temperature)
 Thermo 23 read temperature function.
 

Detailed Description

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

◆ thermo23_cfg_setup()

void thermo23_cfg_setup ( thermo23_cfg_t * cfg)

Thermo 23 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ thermo23_default_cfg()

err_t thermo23_default_cfg ( thermo23_t * ctx)

Thermo 23 default configuration function.

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

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

◆ thermo23_init()

err_t thermo23_init ( thermo23_t * ctx,
thermo23_cfg_t * cfg )

Thermo 23 initialization function.

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

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

◆ thermo23_read_command()

err_t thermo23_read_command ( thermo23_t * ctx,
uint8_t cmd,
uint16_t * data_out )

Thermo 23 read command function.

This function reads data from the selected command by using UART serial interface.

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

◆ thermo23_read_temperature()

err_t thermo23_read_temperature ( thermo23_t * ctx,
float * temperature )

Thermo 23 read temperature function.

This function reads the temperature value in Celsius.

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

◆ thermo23_set_config()

err_t thermo23_set_config ( thermo23_t * ctx,
uint16_t config )

Thermo 23 set config function.

This function sets the configuration register.

Parameters
[in]ctx: Click context object. See thermo23_t object definition for detailed explanation.
[in]config: Config register value to be set.
Returns
  • 0 - Success,
  • -1 - Error/Timeout. See #err_t definition for detailed explanation.
Note
None.

◆ thermo23_write_command()

err_t thermo23_write_command ( thermo23_t * ctx,
uint8_t cmd,
uint16_t data_in )

Thermo 23 write command function.

This function writes a desired data to the selected command by using UART serial interface.

Parameters
[in]ctx: Click context object. See thermo23_t object definition for detailed explanation.
[in]cmd: Command byte.
[in]data_in: Data to be written.
Returns
  • 0 - Success,
  • -1 - Error/Timeout. See #err_t definition for detailed explanation.
Note
None.