tempiso  2.1.0.0
Modules | Functions
Temp ISO Click Driver

API for configuring and manipulating Temp ISO Click driver. More...

Modules

 Temp ISO Registers Settings
 Settings for registers of Temp ISO Click driver.
 
 Temp ISO MikroBUS Map
 MikroBUS pin mapping of Temp ISO Click driver.
 

Functions

void tempiso_cfg_setup (tempiso_cfg_t *cfg)
 Temp ISO configuration object setup function. More...
 
err_t tempiso_init (tempiso_t *ctx, tempiso_cfg_t *cfg)
 Temp ISO initialization function. More...
 
err_t tempiso_read_raw_adc (tempiso_t *ctx, uint16_t *raw_adc)
 Temp ISO read raw ADC value function. More...
 
err_t tempiso_read_voltage (tempiso_t *ctx, float *voltage)
 Temp ISO read voltage level function. More...
 
err_t tempiso_read_voltage_avg (tempiso_t *ctx, uint16_t num_conv, float *voltage_avg)
 Temp ISO read average voltage level function. More...
 
err_t tempiso_set_vref (tempiso_t *ctx, float vref)
 Temp ISO set vref function. More...
 
err_t tempiso_read_temperature (tempiso_t *ctx, float *data_out)
 Temp ISO read temperature function. More...
 

Detailed Description

API for configuring and manipulating Temp ISO 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

◆ tempiso_cfg_setup()

void tempiso_cfg_setup ( tempiso_cfg_t cfg)

Temp ISO configuration object setup function.

This function initializes Click configuration structure to initial values.

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

◆ tempiso_init()

err_t tempiso_init ( tempiso_t ctx,
tempiso_cfg_t cfg 
)

Temp ISO initialization function.

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

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

◆ tempiso_read_raw_adc()

err_t tempiso_read_raw_adc ( tempiso_t ctx,
uint16_t *  raw_adc 
)

Temp ISO read raw ADC value function.

This function reads raw ADC value.

Parameters
[in]ctx: Click context object. See tempiso_t object definition for detailed explanation.
[out]raw_adc: Output ADC result.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ tempiso_read_temperature()

err_t tempiso_read_temperature ( tempiso_t ctx,
float *  data_out 
)

Temp ISO read temperature function.

This function reads the voltage level from AN pin and converts it to temperature in degrees Celsius.

Parameters
[in]ctx: Click context object. See tempiso_t object definition for detailed explanation.
[out]data_out: Temperature measurement [degC].
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
None.

◆ tempiso_read_voltage()

err_t tempiso_read_voltage ( tempiso_t ctx,
float *  voltage 
)

Temp ISO read voltage level function.

This function reads raw ADC value and converts it to proportional voltage level.

Parameters
[in]ctx: Click context object. See tempiso_t object definition for detailed explanation.
[out]voltage: Output voltage level [V].
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
The conversion to voltage depends on the entered reference voltage.

◆ tempiso_read_voltage_avg()

err_t tempiso_read_voltage_avg ( tempiso_t ctx,
uint16_t  num_conv,
float *  voltage_avg 
)

Temp ISO read average voltage level function.

This function reads a desired number of ADC samples and calculates the average voltage level.

Parameters
[in]ctx: Click context object. See tempiso_t object definition for detailed explanation.
[in]num_conv: Number of ADC samples.
[out]voltage_avg: Average output voltage level [V].
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
The conversion to voltage depends on the entered reference voltage.

◆ tempiso_set_vref()

err_t tempiso_set_vref ( tempiso_t ctx,
float  vref 
)

Temp ISO set vref function.

This function sets the voltage reference for Temp ISO Click driver.

Parameters
[in]ctx: Click context object. See tempiso_t object definition for detailed explanation.
[in]vref: Reference voltage (volts).
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.
Note
The default voltage reference set with tempiso_init is 3.3V.