thermo22 2.0.0.0
thermo22.h File Reference

This file contains API for Thermo 22 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  thermo22_t
 Thermo 22 Click context object. More...
 
struct  thermo22_cfg_t
 Thermo 22 Click configuration object. More...
 

Macros

#define THERMO22_REG_TEMPERATURE   0x00
 Thermo 22 register list.
 
#define THERMO22_REG_CONFIGURATION   0x01
 
#define THERMO22_REG_TEMPERATURE_LOW   0x02
 
#define THERMO22_REG_TEMPERATURE_HIGH   0x03
 
#define THERMO22_REG_ONE_SHOT   0x04
 
#define THERMO22_CONFIG_ONESHOT_DIS   0x00
 Thermo 22 Configuration register setting.
 
#define THERMO22_CONFIG_ONESHOT_EN   0x20
 
#define THERMO22_CONFIG_FAULT_QUEUE_1   0x00
 
#define THERMO22_CONFIG_FAULT_QUEUE_2   0x08
 
#define THERMO22_CONFIG_FAULT_QUEUE_4   0x10
 
#define THERMO22_CONFIG_FAULT_QUEUE_6   0x18
 
#define THERMO22_CONFIG_ALERT_ACTIVE_LOW   0x00
 
#define THERMO22_CONFIG_ALERT_ACTIVE_HIGH   0x04
 
#define THERMO22_CONFIG_ALERT_COMPARATOR   0x00
 
#define THERMO22_CONFIG_ALERT_INTERRUPT   0x02
 
#define THERMO22_CONFIG_SHUTDOWN_DIS   0x00
 
#define THERMO22_CONFIG_SHUTDOWN_EN   0x01
 
#define THERMO22_TEMPERATURE_RESOLUTION   0.0625
 Thermo 22 temperature resolution value.
 
#define THERMO22_TEMPERATURE_MAX   128.0
 
#define THERMO22_TEMPERATURE_MIN   -128.0
 
#define THERMO22_TEMPERATURE_ALERT_LIMIT   35.0
 
#define THERMO22_DEV_ADDR_A2A1A0_000   0x48
 Thermo 22 device address setting.
 
#define THERMO22_DEV_ADDR_A2A1A0_001   0x49
 
#define THERMO22_DEV_ADDR_A2A1A0_010   0x4A
 
#define THERMO22_DEV_ADDR_A2A1A0_011   0x4B
 
#define THERMO22_DEV_ADDR_A2A1A0_100   0x4C
 
#define THERMO22_DEV_ADDR_A2A1A0_101   0x4D
 
#define THERMO22_DEV_ADDR_A2A1A0_110   0x4E
 
#define THERMO22_DEV_ADDR_A2A1A0_111   0x4F
 
#define THERMO22_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  thermo22_return_value_t { THERMO22_OK = 0 , THERMO22_ERROR = -1 }
 Thermo 22 Click return value data. More...
 

Functions

void thermo22_cfg_setup (thermo22_cfg_t *cfg)
 Thermo 22 configuration object setup function.
 
err_t thermo22_init (thermo22_t *ctx, thermo22_cfg_t *cfg)
 Thermo 22 initialization function.
 
err_t thermo22_default_cfg (thermo22_t *ctx)
 Thermo 22 default configuration function.
 
err_t thermo22_write_config (thermo22_t *ctx, uint8_t config)
 Thermo 22 write config function.
 
err_t thermo22_read_config (thermo22_t *ctx, uint8_t *config)
 Thermo 22 read config function.
 
err_t thermo22_read_temperature (thermo22_t *ctx, float *temperature)
 Thermo 22 read temperature function.
 
err_t thermo22_set_temperature_low_limit (thermo22_t *ctx, float low_limit)
 Thermo 22 set temperature low limit function.
 
err_t thermo22_set_temperature_high_limit (thermo22_t *ctx, float high_limit)
 Thermo 22 set temperature high limit function.
 
uint8_t thermo22_get_int_pin (thermo22_t *ctx)
 Thermo 22 get int pin function.
 

Detailed Description

This file contains API for Thermo 22 Click Driver.

Enumeration Type Documentation

◆ thermo22_return_value_t

Thermo 22 Click return value data.

Predefined enum values for driver return values.

Enumerator
THERMO22_OK 
THERMO22_ERROR