thermo24 2.0.0.0
thermo24.h File Reference

This file contains API for Thermo 24 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  thermo24_t
 Thermo 24 Click context object. More...
 
struct  thermo24_cfg_t
 Thermo 24 Click configuration object. More...
 

Macros

#define THERMO24_CMD_MEASURE_HIGH_PRECISION   0xFD
 Thermo 24 commands list.
 
#define THERMO24_CMD_MEASURE_MEDIUM_PRECISION   0xF6
 
#define THERMO24_CMD_MEASURE_LOWEST_PRECISION   0xE0
 
#define THERMO24_CMD_READ_SERIAL   0x89
 
#define THERMO24_CMD_SOFT_RESET   0x94
 
#define THERMO24_MEASURE_PRECISION_LOW   0x00
 Thermo 24 temperature measurement precision selection.
 
#define THERMO24_MEASURE_PRECISION_MEDIUM   0x01
 
#define THERMO24_MEASURE_PRECISION_HIGH   0x02
 
#define THERMO24_TEMP_RESOLUTION   0xFFFF
 Thermo 24 temperature calculation values.
 
#define THERMO24_TEMP_MULTIPLIER_CELSIUS   175.0
 
#define THERMO24_TEMP_OFFSET   45.0
 
#define THERMO24_SET_DEVICE_ADDRESS   0x44
 Thermo 24 device address setting.
 
#define THERMO24_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  thermo24_return_value_t { THERMO24_OK = 0 , THERMO24_ERROR = -1 }
 Thermo 24 Click return value data. More...
 

Functions

void thermo24_cfg_setup (thermo24_cfg_t *cfg)
 Thermo 24 configuration object setup function.
 
err_t thermo24_init (thermo24_t *ctx, thermo24_cfg_t *cfg)
 Thermo 24 initialization function.
 
err_t thermo24_soft_reset (thermo24_t *ctx)
 Thermo 24 soft reset function.
 
err_t thermo24_read_serial (thermo24_t *ctx, uint32_t *serial_num)
 Thermo 24 read serial function.
 
err_t thermo24_read_temperature (thermo24_t *ctx, uint8_t precision, float *temperature)
 Thermo 24 read temperature function.
 

Detailed Description

This file contains API for Thermo 24 Click Driver.

Enumeration Type Documentation

◆ thermo24_return_value_t

Thermo 24 Click return value data.

Predefined enum values for driver return values.

Enumerator
THERMO24_OK 
THERMO24_ERROR