surfacetemp 2.0.0.0
surfacetemp.h File Reference

This file contains API for Surface temp 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  surfacetemp_t
 Click ctx object definition. More...
 
struct  surfacetemp_cfg_t
 Click configuration structure definition. More...
 

Macros

#define SURFACETEMP_MAP_MIKROBUS(cfg, mikrobus)
 
#define SURFACETEMP_RETVAL   uint8_t
 
#define SURFACETEMP_OK   0x00
 
#define SURFACETEMP_INIT_ERROR   0xFF
 
#define DEVICE_OK   0
 
#define DEVICE_ERROR   1
 
#define SURFACETEMP_SLAVE_DEVICE_ADDR_0_0   0x48
 
#define SURFACETEMP_SLAVE_DEVICE_ADDR_0_1   0x49
 
#define SURFACETEMP_SLAVE_DEVICE_ADDR_1_0   0x4A
 
#define SURFACETEMP_SLAVE_DEVICE_ADDR_1_1   0x4B
 
#define SURFACETEMP_REG_TEMP_MSB   0x00
 
#define SURFACETEMP_REG_TEMP_LSB   0x01
 
#define SURFACETEMP_REG_STATUS   0x02
 
#define SURFACETEMP_REG_CONFIG   0x03
 
#define SURFACETEMP_REG_T_HIGH_SETP_MSB   0x04
 
#define SURFACETEMP_REG_T_HIGH_SETP_LSB   0x05
 
#define SURFACETEMP_REG_T_LOW_SETP_MSB   0x06
 
#define SURFACETEMP_REG_T_LOW_SETP_LSB   0x07
 
#define SURFACETEMP_REG_T_CRIT_SETP_MSB   0x08
 
#define SURFACETEMP_REG_T_CRIT_SETP_LSB   0x09
 
#define SURFACETEMP_REG_T_HYST_SETP   0x0A
 
#define SURFACETEMP_REG_ID   0x0B
 
#define SURFACETEMP_REG_SOFT_RESET   0x2F
 
#define SURFACETEMP_T_LOW_MASK   0x10
 
#define SURFACETEMP_T_HIGH_MASK   0x20
 
#define SURFACETEMP_T_CRIT_MASK   0x40
 
#define SURFACETEMP_RDY_MASK   0x80
 

Functions

void surfacetemp_cfg_setup (surfacetemp_cfg_t *cfg)
 Config Object Initialization function.
 
SURFACETEMP_RETVAL surfacetemp_init (surfacetemp_t *ctx, surfacetemp_cfg_t *cfg)
 Initialization function.
 
void surfacetemp_default_cfg (surfacetemp_t *ctx)
 Click Default Configuration function.
 
void surfacetemp_generic_write (surfacetemp_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void surfacetemp_generic_read (surfacetemp_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
uint8_t surfacetemp_get_pwm_pin (surfacetemp_t *ctx)
 Getting PWM pin state.
 
void surfacetemp_soft_reset (surfacetemp_t *ctx)
 Soft reset.
 
float surfacetemp_get_temperature (surfacetemp_t *ctx)
 Getting temperature value.
 
uint8_t surfacetemp_get_status (surfacetemp_t *ctx)
 Getting device status.
 
uint8_t surfacetemp_set_high_threshold (surfacetemp_t *ctx, float high_threshold)
 Setting high threshold limit.
 
uint8_t surfacetemp_set_low_threshold (surfacetemp_t *ctx, float high_threshold)
 Setting low threshold limit.
 
uint8_t surfacetemp_set_critical_threshold (surfacetemp_t *ctx, float high_threshold)
 Setting critical threshold limit.
 
uint8_t surfacetemp_set_hysteresis (surfacetemp_t *ctx, uint8_t hysteresis)
 Setting hysteresis value.
 
uint8_t surfacetemp_setup (surfacetemp_t *ctx)
 Device initialization.
 

Detailed Description

This file contains API for Surface temp Click driver.