rtd 2.0.0.0
Public function

Functions

void rtd_cfg_setup (rtd_cfg_t *cfg)
 Config Object Initialization function.
 
err_t rtd_init (rtd_t *ctx, rtd_cfg_t *cfg)
 Initialization function.
 
void rtd_write_register (rtd_t *ctx, uint8_t reg_address, uint8_t write_data)
 Write to Register function.
 
uint8_t rtd_read_register (rtd_t *ctx, uint8_t reg_address)
 Read from Register function.
 
uint16_t rtd_read_temperature (rtd_t *ctx)
 Read Temperature function.
 
float rtd_convert_temperature (rtd_t *ctx, uint16_t input_data, uint16_t referent_resistance)
 Convert Temperature function.
 

Detailed Description

Function Documentation

◆ rtd_cfg_setup()

void rtd_cfg_setup ( rtd_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ rtd_convert_temperature()

float rtd_convert_temperature ( rtd_t * ctx,
uint16_t input_data,
uint16_t referent_resistance )

Convert Temperature function.

Parameters
ctxClick object.
input_dataUnconverted input data.
referent_resistanceValue of external referent resistance in Ohms.

This function convert data from temperature registers.

Note
Referent resistance on the click board can be changed to better match the sensor in use. Input the value of the resistor used in Ohms to get correct data.

◆ rtd_init()

err_t rtd_init ( rtd_t * ctx,
rtd_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ rtd_read_register()

uint8_t rtd_read_register ( rtd_t * ctx,
uint8_t reg_address )

Read from Register function.

Parameters
ctxClick object.
reg_addressAddress to read from.

This function reads data from the chosen register.

◆ rtd_read_temperature()

uint16_t rtd_read_temperature ( rtd_t * ctx)

Read Temperature function.

Parameters
ctxClick object.

This function reads data from temperature registers.

◆ rtd_write_register()

void rtd_write_register ( rtd_t * ctx,
uint8_t reg_address,
uint8_t write_data )

Write to Register function.

Parameters
ctxClick object.
reg_addressAddress to write to.
write_dataData to write.

This function writes the input data into the chosen register.

Note
This function automaticaly adds write bit as needed by this device.