rtd
2.0.0.0
|
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, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len) |
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... | |
void rtd_cfg_setup | ( | rtd_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
This function initializes click configuration structure to init state.
float rtd_convert_temperature | ( | rtd_t * | ctx, |
uint16_t | input_data, | ||
uint16_t | referent_resistance | ||
) |
Convert Temperature function.
rtd | Click object. |
input_data | Unconverted input data. |
referent_resistance | Value of external referent resistance in Ohms. |
This function convert data from temperature registers.
void rtd_generic_transfer | ( | rtd_t * | ctx, |
uint8_t * | wr_buf, | ||
uint16_t | wr_len, | ||
uint8_t * | rd_buf, | ||
uint16_t | rd_len | ||
) |
Generic transfer function.
ctx | Click object. |
wr_buf | Write data buffer |
wr_len | Number of byte in write data buffer |
rd_buf | Read data buffer |
rd_len | Number of byte in read data buffer |
Generic SPI transfer, for sending and receiving packages
RTD_RETVAL rtd_init | ( | rtd_t * | ctx, |
rtd_cfg_t * | cfg | ||
) |
Initialization function.
rtd | Click object. |
cfg | Click configuration structure. |
This function initializes all necessary pins and peripherals used for this click.
uint8_t rtd_read_register | ( | rtd_t * | ctx, |
uint8_t | reg_address | ||
) |
Read from Register function.
rtd | Click object. |
reg_address | Address to read from. |
This function reads data from the chosen register.
uint16_t rtd_read_temperature | ( | rtd_t * | ctx | ) |
Read Temperature function.
rtd | Click object. |
This function reads data from temperature registers.
void rtd_write_register | ( | rtd_t * | ctx, |
uint8_t | reg_address, | ||
uint8_t | write_data | ||
) |
Write to Register function.
rtd | Click object. |
reg_address | Address to write to. |
write_data | Data to write. |
This function writes the input data into the chosen register.