rtd  2.0.0.0
Data Structures | Macros | Functions
rtd.h File Reference

This file contains API for RTD Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_spi_master.h"

Go to the source code of this file.

Data Structures

struct  rtd_t
 Click ctx object definition. More...
 
struct  rtd_cfg_t
 Click configuration structure definition. More...
 

Macros

#define RTD_MAP_MIKROBUS(cfg, mikrobus)
 
#define RTD_RETVAL   uint8_t
 
#define RTD_OK   0x00
 
#define RTD_INIT_ERROR   0xFF
 
#define RTD_ERR   1
 
#define RTD_REF_RESISTANCE_470   470
 
#define RTD_CONFIGURATION   0x00
 
#define RTD_RTD_MSB   0x01
 
#define RTD_RTD_LSB   0x02
 
#define RTD_HI_FLT_THRHLD_MSB   0x03
 
#define RTD_HI_FLT_THRHLD_LSB   0x04
 
#define RTD_LO_FLT_THRHLD_MSB   0x05
 
#define RTD_LO_FLT_THRHLD_LSB   0x06
 
#define RTD_FLT_STATUS   0x07
 

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

This file contains API for RTD Click driver.