thermostat3 2.0.0.0
thermostat3.h File Reference

This file contains API for Thermostat 3 Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_spi_master.h"

Go to the source code of this file.

Data Structures

struct  thermostat3_t
 Click ctx object definition. More...
 
struct  thermostat3_cfg_t
 Click configuration structure definition. More...
 
struct  temp_vals_t
 

Macros

#define THERMOSTAT3_MAP_MIKROBUS(cfg, mikrobus)
 
#define THERMOSTAT_RETVAL   uint8_t
 
#define THERMOSTAT_OK   0x00
 
#define THERMOSTAT_INIT_ERROR   0xFF
 
#define THERMOSTAT3_RELAY_ON   0x01
 
#define THERMOSTAT3_RELAY_OFF   0x00
 
#define THERMOSTAT3_TEMP_IN_CELSIUS   0x00
 
#define THERMOSTAT3_TEMP_IN_FAHRENHEIT   0x02
 
#define THERMOSTAT3_TEMP_IN_KELVIN   0x01
 
#define THERMOSTAT3_FAULT_ACTIVE_FLAG   0x08
 
#define THERMOSTAT3_FAULT_SCV_FLAG   0x04
 
#define THERMOSTAT3_FAULT_SCG_FLAG   0x02
 
#define THERMOSTAT3_FAULT_OC_FLAG   0x01
 
#define THERMOSTAT3_FAULT_ALL_FLAG   0x00
 
#define NULL   0x00
 

Functions

void thermostat3_cfg_setup (thermostat3_cfg_t *cfg)
 Config Object Initialization function.
 
THERMOSTAT_RETVAL thermostat3_init (thermostat3_t *ctx, thermostat3_cfg_t *cfg)
 Initialization function.
 
void thermostat3_generic_read (thermostat3_t *ctx, uint8_t *read_buff)
 
void thermostat3_process (thermostat3_t *ctx, temp_vals_t *tmp)
 Thermostat Process Read data.
 
float thermostat3_get_internal_temperature (temp_vals_t *tmp, uint8_t temp_in)
 Junction (Internal) Temperature.
 
float thermostat3_get_thermocouple_temperature (temp_vals_t *tmp, uint8_t temp_in)
 Thermocouple Temperature (K probe)
 
uint8_t thermostat3_get_fault_data (temp_vals_t *tmp, uint8_t err)
 Fault data value.
 
void thermostat3_relay_control (thermostat3_t *ctx, uint8_t relay_pos)
 Relay Control.
 

Detailed Description

This file contains API for Thermostat 3 Click driver.