thermo30 2.1.0.0
thermo30.h File Reference

This file contains API for Thermo 30 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  thermo30_t
 Thermo 30 Click context object. More...
 
struct  thermo30_cfg_t
 Thermo 30 Click configuration object. More...
 

Macros

#define THERMO30_CMD_SINGLE_SHOT_CLK_STR_EN_REP_HIGH   0x2C06
 Thermo 30 commands list.
 
#define THERMO30_CMD_SINGLE_SHOT_CLK_STR_EN_REP_MID   0x2C0D
 
#define THERMO30_CMD_SINGLE_SHOT_CLK_STR_EN_REP_LOW   0x2C10
 
#define THERMO30_CMD_SINGLE_SHOT_CLK_STR_DIS_REP_HIGH   0x2400
 
#define THERMO30_CMD_SINGLE_SHOT_CLK_STR_DIS_REP_MID   0x240B
 
#define THERMO30_CMD_SINGLE_SHOT_CLK_STR_DIS_REP_LOW   0x2416
 
#define THERMO30_CMD_PERIODIC_0p5_MPS_REP_HIGH   0x2032
 
#define THERMO30_CMD_PERIODIC_0p5_MPS_REP_MID   0x2024
 
#define THERMO30_CMD_PERIODIC_0p5_MPS_REP_LOW   0x202F
 
#define THERMO30_CMD_PERIODIC_1_MPS_REP_HIGH   0x2130
 
#define THERMO30_CMD_PERIODIC_1_MPS_REP_MID   0x2126
 
#define THERMO30_CMD_PERIODIC_1_MPS_REP_LOW   0x212D
 
#define THERMO30_CMD_PERIODIC_2_MPS_REP_HIGH   0x2236
 
#define THERMO30_CMD_PERIODIC_2_MPS_REP_MID   0x2220
 
#define THERMO30_CMD_PERIODIC_2_MPS_REP_LOW   0x222B
 
#define THERMO30_CMD_PERIODIC_4_MPS_REP_HIGH   0x2334
 
#define THERMO30_CMD_PERIODIC_4_MPS_REP_MID   0x2322
 
#define THERMO30_CMD_PERIODIC_4_MPS_REP_LOW   0x2329
 
#define THERMO30_CMD_PERIODIC_10_MPS_REP_HIGH   0x2737
 
#define THERMO30_CMD_PERIODIC_10_MPS_REP_MID   0x2721
 
#define THERMO30_CMD_PERIODIC_10_MPS_REP_LOW   0x272A
 
#define THERMO30_CMD_FETCH_DATA   0xE000
 
#define THERMO30_CMD_BREAK   0x3093
 
#define THERMO30_CMD_SOFT_RESET   0x30A2
 
#define THERMO30_CMD_HEATER_ENABLE   0x306D
 
#define THERMO30_CMD_HEATER_DISABLE   0x3066
 
#define THERMO30_CMD_READ_STATUS   0xF32D
 
#define THERMO30_CMD_CLEAR_STATUS   0x3041
 
#define THERMO30_CMD_GET_SERIAL_NUM   0x3780
 
#define THERMO30_PIN_STATE_HIGH   0x01
 Thermo 30 pin state values.
 
#define THERMO30_PIN_STATE_LOW   0x00
 
#define THERMO30_DATA_RESOLUTION   65535.0f
 Thermo 30 temperature calculation values.
 
#define THERMO30_ABS_MIN_TEMP   -45.0f
 
#define THERMO30_ABS_MAX_TEMP   175.0f
 
#define THERMO30_DEVICE_ADDRESS_GND   0x4A
 Thermo 30 device address setting.
 
#define THERMO30_DEVICE_ADDRESS_VCC   0x4B
 
#define THERMO30_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  thermo30_return_value_t { THERMO30_OK = 0 , THERMO30_ERROR = -1 }
 Thermo 30 Click return value data. More...
 

Functions

void thermo30_cfg_setup (thermo30_cfg_t *cfg)
 Thermo 30 configuration object setup function.
 
err_t thermo30_init (thermo30_t *ctx, thermo30_cfg_t *cfg)
 Thermo 30 initialization function.
 
err_t thermo30_default_cfg (thermo30_t *ctx)
 Thermo 30 default configuration function.
 
void thermo30_set_rst_pin (thermo30_t *ctx, uint8_t pin_state)
 Thermo 30 set rst pin function.
 
void thermo30_hw_reset (thermo30_t *ctx)
 Thermo 30 hw reset device function.
 
uint8_t thermo30_get_alert_pin (thermo30_t *ctx)
 Thermo 30 get alert pin function.
 
err_t thermo30_write_command (thermo30_t *ctx, uint16_t cmd)
 Thermo 30 write command function.
 
err_t thermo30_read_command (thermo30_t *ctx, uint16_t cmd, uint16_t *data_out)
 Thermo 30 read command function.
 
err_t thermo30_start_measurement (thermo30_t *ctx, uint16_t cmd)
 Thermo 30 start measurement function.
 
err_t thermo30_stop_measurement (thermo30_t *ctx)
 Thermo 30 stop measurement function.
 
err_t thermo30_read_status (thermo30_t *ctx, uint16_t *status_val)
 Thermo 30 read status function.
 
err_t thermo30_read_temperature (thermo30_t *ctx, float *temperature)
 Thermo 30 read temperature function.
 

Detailed Description

This file contains API for Thermo 30 Click Driver.

Enumeration Type Documentation

◆ thermo30_return_value_t

Thermo 30 Click return value data.

Predefined enum values for driver return values.

Enumerator
THERMO30_OK 
THERMO30_ERROR