thermo9 2.0.0.0
thermo9.h File Reference

This file contains API for Thermo 9 Click driver. More...

#include "drv_digital_out.h"
#include "drv_i2c_master.h"
#include "drv_spi_master.h"

Go to the source code of this file.

Data Structures

struct  thermo9_temp_coef_t
 Temperature calibration coefficient. More...
 
struct  thermo9_s
 Click ctx object definition. More...
 
struct  thermo9_cfg_t
 Click configuration structure definition. More...
 

Macros

#define THERMO9_MAP_MIKROBUS(cfg, mikrobus)
 
#define THERMO9_MASTER_I2C   0
 
#define THERMO9_MASTER_SPI   1
 
#define THERMO9_RETVAL   uint8_t
 
#define THERMO9_OK   0x00
 
#define THERMO9_INIT_ERROR   0xFF
 
#define THERMO9_ADDR_VCC   0x76
 
#define THERMO9_ADDR_GND   0x77
 
#define THERMO9_DUMMY_BYTE   0x00
 
#define THERMO9_RESET_CMD   0x1E
 
#define THERMO9_START_ADC_TEMP_CONV   0x48
 
#define THERMO9_READ_ADC_TEMP_RES   0x00
 
#define THERMO9_PROM_READ_ADR_0   0xA0
 
#define THERMO9_PROM_READ_ADR_1_COEF_K4   0xA2
 
#define THERMO9_PROM_READ_ADR_2_COEF_K3   0xA4
 
#define THERMO9_PROM_READ_ADR_3_COEF_K2   0xA6
 
#define THERMO9_PROM_READ_ADR_4_COEF_K1   0xA8
 
#define THERMO9_PROM_READ_ADR_5_COEF_K0   0xAA
 
#define THERMO9_PROM_READ_ADR_6_SN23_8   0xAC
 
#define THERMO9_PROM_READ_ADR_7_SN7_0_CHECKSUM   0xAE
 
#define THERMO9_COEF_CALC_4_2   -2
 
#define THERMO9_COEF_CALC_3   4
 
#define THERMO9_COEF_CALC_0   -1.5
 
#define THERMO9_CALC_COEF_4   1000000000000000000000.0
 
#define THERMO9_CALC_COEF_3   10000000000000000.0
 
#define THERMO9_CALC_COEF_2   100000000000.0
 
#define THERMO9_CALC_COEF_1   1000000.0
 
#define THERMO9_CALC_COEF_0   100.0
 
#define THERMO9_RES_MOD   256.0
 

Typedefs

typedef uint8_t thermo9_select_t
 Communication type.
 
typedef void(* thermo9_master_io_t) (struct thermo9_s *, uint8_t, uint8_t *, uint8_t)
 Master Input/Output type.
 
typedef struct thermo9_s thermo9_t
 Click ctx object definition.
 

Functions

void thermo9_cfg_setup (thermo9_cfg_t *cfg)
 Config Object Initialization function.
 
THERMO9_RETVAL thermo9_init (thermo9_t *ctx, thermo9_cfg_t *cfg)
 Initialization function.
 
void thermo9_generic_write (thermo9_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void thermo9_generic_read (thermo9_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void thermo9_send_cmd (thermo9_t *ctx, uint8_t cmd_byte)
 Send command function.
 
void thermo9_calibation (thermo9_t *ctx)
 Calibration function.
 
float thermo9_read_temp (thermo9_t *ctx)
 Read temperature function.
 

Detailed Description

This file contains API for Thermo 9 Click driver.