thermok3 2.1.0.0
thermok3.h File Reference

This file contains API for Thermo K 3 Click Driver. More...

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

Go to the source code of this file.

Data Structures

struct  thermok3_t
 Thermo K 3 Click context object. More...
 
struct  thermok3_cfg_t
 Thermo K 3 Click configuration object. More...
 

Macros

#define THERMOK3_DUMMY_SIGN_BIT   0x80
 Thermo K 3 output data setting.
 
#define THERMOK3_OPEN_THERMOCOUPLE_BIT   0x04
 
#define THERMOK3_DEVICE_ID_BIT   0x02
 
#define THERMOK3_DATA_RESOLUTION   0x0FFFu
 Thermo K 3 data resolution setting.
 
#define THERMOK3_TEMP_RESOLUTION   0.25f
 
#define THERMOK3_SET_DATA_SAMPLE_EDGE   SET_SPI_DATA_SAMPLE_EDGE
 Data sample selection.
 
#define THERMOK3_SET_DATA_SAMPLE_MIDDLE   SET_SPI_DATA_SAMPLE_MIDDLE
 
#define THERMOK3_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  thermok3_return_value_t { THERMOK3_OK = 0 , THERMOK3_ERROR = -1 , THERMOK3_OPEN_THERMOCOUPLE = -2 }
 Thermo K 3 Click return value data. More...
 

Functions

void thermok3_cfg_setup (thermok3_cfg_t *cfg)
 Thermo K 3 configuration object setup function.
 
err_t thermok3_init (thermok3_t *ctx, thermok3_cfg_t *cfg)
 Thermo K 3 initialization function.
 
err_t thermok3_read_data (thermok3_t *ctx, uint16_t *data_out)
 Thermo K 3 read data function.
 
err_t thermok3_read_temperature (thermok3_t *ctx, float *temperature)
 Thermo K 3 read temperature function.
 

Detailed Description

This file contains API for Thermo K 3 Click Driver.

Enumeration Type Documentation

◆ thermok3_return_value_t

Thermo K 3 Click return value data.

Predefined enum values for driver return values.

Enumerator
THERMOK3_OK 
THERMOK3_ERROR 
THERMOK3_OPEN_THERMOCOUPLE