rtd  2.0.0.0
Functions
Public function

Functions

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

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
rtdClick 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_generic_transfer()

void rtd_generic_transfer ( rtd_t ctx,
spi_master_transfer_data_t *  block 
)

Generic transfer function.

Parameters
ctxClick object.
blockTransfer block structure.

Generic SPI transfer, for sending and receiving packages

◆ rtd_init()

RTD_RETVAL rtd_init ( rtd_t ctx,
rtd_cfg_t cfg 
)

Initialization function.

Parameters
rtdClick 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
rtdClick 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
rtdClick 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
rtdClick 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.