thermo23 2.0.0.0
thermo23.h File Reference

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

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_uart.h"

Go to the source code of this file.

Data Structures

struct  thermo23_t
 Thermo 23 Click context object. More...
 
struct  thermo23_cfg_t
 Thermo 23 Click configuration object. More...
 

Macros

#define THERMO23_CMD_SOFT_RESET   0xB4
 Thermo 23 control commands.
 
#define THERMO23_CMD_GLOBAL_INIT   0x8C
 
#define THERMO23_CMD_GLOBAL_ADDRESS_ASSIGN   0x90
 
#define THERMO23_CMD_GLOBAL_CLEAR_INT   0xA9
 
#define THERMO23_CMD_GLOBAL_WRITE_TEMP   0xF0
 
#define THERMO23_CMD_GLOBAL_WRITE_CONFIG   0xF2
 
#define THERMO23_CMD_GLOBAL_WRITE_TLOW   0xF4
 
#define THERMO23_CMD_GLOBAL_WRITE_THIGH   0xF6
 
#define THERMO23_CMD_GLOBAL_READ_TEMP   0xF1
 
#define THERMO23_CMD_GLOBAL_READ_CONFIG   0xF3
 
#define THERMO23_CMD_GLOBAL_READ_TLOW   0xF5
 
#define THERMO23_CMD_GLOBAL_READ_THIGH   0xF7
 
#define THERMO23_CMD_INDIVIDUAL_WRITE_BIT   0x00
 
#define THERMO23_CMD_INDIVIDUAL_READ_BIT   0x01
 
#define THERMO23_CALIBRATION_BYTE   0x55
 Thermo 23 calibration byte.
 
#define THERMO23_TIMEOUT   5000
 Thermo 23 timeout value in milliseconds.
 
#define THERMO23_CONFIG_INT_EN   0x8000
 Thermo 23 config register settings.
 
#define THERMO23_CONFIG_CR_0p25HZ   0x0000
 
#define THERMO23_CONFIG_CR_1HZ   0x2000
 
#define THERMO23_CONFIG_CR_4HZ   0x4000
 
#define THERMO23_CONFIG_CR_8HZ   0x6000
 
#define THERMO23_CONFIG_FH   0x1000
 
#define THERMO23_CONFIG_FL   0x0800
 
#define THERMO23_CONFIG_LC   0x0400
 
#define THERMO23_CONFIG_MODE_SHUTDOWN   0x0000
 
#define THERMO23_CONFIG_MODE_ONE_SHOT   0x0100
 
#define THERMO23_CONFIG_MODE_CONTINUOUS   0x0200
 
#define THERMO23_CONFIG_ETM   0x0080
 
#define THERMO23_CONFIG_RESERVED_BITS   0x007F
 
#define THERMO23_TEMP_RESOLUTION   0.0625
 Thermo 23 temperature resolution.
 
#define DRV_BUFFER_SIZE   200
 Thermo 23 driver buffer size.
 
#define THERMO23_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  thermo23_return_value_t { THERMO23_OK = 0 , THERMO23_ERROR = -1 }
 Thermo 23 Click return value data. More...
 

Functions

void thermo23_cfg_setup (thermo23_cfg_t *cfg)
 Thermo 23 configuration object setup function.
 
err_t thermo23_init (thermo23_t *ctx, thermo23_cfg_t *cfg)
 Thermo 23 initialization function.
 
err_t thermo23_default_cfg (thermo23_t *ctx)
 Thermo 23 default configuration function.
 
err_t thermo23_write_command (thermo23_t *ctx, uint8_t cmd, uint16_t data_in)
 Thermo 23 write command function.
 
err_t thermo23_read_command (thermo23_t *ctx, uint8_t cmd, uint16_t *data_out)
 Thermo 23 read command function.
 
err_t thermo23_set_config (thermo23_t *ctx, uint16_t config)
 Thermo 23 set config function.
 
err_t thermo23_read_temperature (thermo23_t *ctx, float *temperature)
 Thermo 23 read temperature function.
 

Detailed Description

This file contains API for Thermo 23 Click Driver.

Enumeration Type Documentation

◆ thermo23_return_value_t

Thermo 23 Click return value data.

Predefined enum values for driver return values.

Enumerator
THERMO23_OK 
THERMO23_ERROR