thermo26 2.1.0.0
thermo26.h File Reference

This file contains API for Thermo 26 Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"

Go to the source code of this file.

Data Structures

struct  thermo26_t
 Thermo 26 Click context object. More...
 
struct  thermo26_cfg_t
 Thermo 26 Click configuration object. More...
 

Macros

#define THERMO26_CMD_SINGLE_SHOT_CLK_STR_EN_REP_HIGH   0x2C06
 Thermo 26 commands list.
 
#define THERMO26_CMD_SINGLE_SHOT_CLK_STR_EN_REP_MID   0x2C0D
 
#define THERMO26_CMD_SINGLE_SHOT_CLK_STR_EN_REP_LOW   0x2C10
 
#define THERMO26_CMD_SINGLE_SHOT_CLK_STR_DIS_REP_HIGH   0x2400
 
#define THERMO26_CMD_SINGLE_SHOT_CLK_STR_DIS_REP_MID   0x240B
 
#define THERMO26_CMD_SINGLE_SHOT_CLK_STR_DIS_REP_LOW   0x2416
 
#define THERMO26_CMD_PERIODIC_0p5_MPS_REP_HIGH   0x2032
 
#define THERMO26_CMD_PERIODIC_0p5_MPS_REP_MID   0x2024
 
#define THERMO26_CMD_PERIODIC_0p5_MPS_REP_LOW   0x202F
 
#define THERMO26_CMD_PERIODIC_1_MPS_REP_HIGH   0x2130
 
#define THERMO26_CMD_PERIODIC_1_MPS_REP_MID   0x2126
 
#define THERMO26_CMD_PERIODIC_1_MPS_REP_LOW   0x212D
 
#define THERMO26_CMD_PERIODIC_2_MPS_REP_HIGH   0x2236
 
#define THERMO26_CMD_PERIODIC_2_MPS_REP_MID   0x2220
 
#define THERMO26_CMD_PERIODIC_2_MPS_REP_LOW   0x222B
 
#define THERMO26_CMD_PERIODIC_4_MPS_REP_HIGH   0x2334
 
#define THERMO26_CMD_PERIODIC_4_MPS_REP_MID   0x2322
 
#define THERMO26_CMD_PERIODIC_4_MPS_REP_LOW   0x2329
 
#define THERMO26_CMD_PERIODIC_10_MPS_REP_HIGH   0x2737
 
#define THERMO26_CMD_PERIODIC_10_MPS_REP_MID   0x2721
 
#define THERMO26_CMD_PERIODIC_10_MPS_REP_LOW   0x272A
 
#define THERMO26_CMD_FETCH_DATA   0xE000
 
#define THERMO26_CMD_BREAK   0x3093
 
#define THERMO26_CMD_SOFT_RESET   0x30A2
 
#define THERMO26_CMD_HEATER_ENABLE   0x306D
 
#define THERMO26_CMD_HEATER_DISABLE   0x3066
 
#define THERMO26_CMD_READ_STATUS   0xF32D
 
#define THERMO26_CMD_CLEAR_STATUS   0x3041
 
#define THERMO26_CMD_GET_SERIAL_NUM   0x3780
 
#define THERMO26_DATA_RESOLUTION   65535.0f
 Thermo 26 temperature calculation values.
 
#define THERMO26_ABS_MIN_TEMP   ( -45.0f )
 
#define THERMO26_ABS_MAX_TEMP   ( 130.0f )
 
#define THERMO26_DEVICE_ADDRESS_0   0x4A
 Thermo 26 device address setting.
 
#define THERMO26_DEVICE_ADDRESS_1   0x4B
 
#define THERMO26_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  thermo26_return_value_t { THERMO26_OK = 0 , THERMO26_ERROR = -1 }
 Thermo 26 Click return value data. More...
 

Functions

void thermo26_cfg_setup (thermo26_cfg_t *cfg)
 Thermo 26 configuration object setup function.
 
err_t thermo26_init (thermo26_t *ctx, thermo26_cfg_t *cfg)
 Thermo 26 initialization function.
 
err_t thermo26_write_command (thermo26_t *ctx, uint16_t cmd)
 Thermo 26 write command function.
 
err_t thermo26_read_command (thermo26_t *ctx, uint16_t cmd, uint16_t *data_out)
 Thermo 26 read command function.
 
void thermo26_reset_device (thermo26_t *ctx)
 Thermo 26 reset device function.
 
void thermo26_set_rst_pin (thermo26_t *ctx, uint8_t state)
 Thermo 26 set rst pin function.
 
uint8_t thermo26_get_alert_pin (thermo26_t *ctx)
 Thermo 26 get alert pin function.
 
err_t thermo26_read_temperature (thermo26_t *ctx, float *temperature)
 Thermo 26 read temperature function.
 
err_t thermo26_read_serial_num (thermo26_t *ctx, uint32_t *serial_num)
 Thermo 26 read serial num function.
 
err_t thermo26_start_measurement (thermo26_t *ctx, uint16_t cmd)
 Thermo 26 start measurement function.
 
err_t thermo26_stop_measurement (thermo26_t *ctx)
 Thermo 26 stop measurement function.
 

Detailed Description

This file contains API for Thermo 26 Click Driver.

Enumeration Type Documentation

◆ thermo26_return_value_t

Thermo 26 Click return value data.

Predefined enum values for driver return values.

Enumerator
THERMO26_OK 
THERMO26_ERROR