thermostat4 2.0.0.0
thermostat4.h File Reference
#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  thermostat4_t
 Thermostat 4 Click context object. More...
 
struct  thermostat4_cfg_t
 Thermostat 4 Click configuration object. More...
 

Macros

#define THERMOSTAT4_RELAY_ON   0x01
 Thermostat 4 description setting.
 
#define THERMOSTAT4_RELAY_OFF   0x00
 
#define THERMOSTAT4_RESET_ON   0x01
 
#define THERMOSTAT4_RESET_OFF   0x00
 
#define THERMOSTAT4_WARM_ALERT   0x00
 
#define THERMOSTAT4_HOT_ALERT   0x00
 
#define THERMOSTAT4_SET_DATA_SAMPLE_EDGE   SET_SPI_DATA_SAMPLE_EDGE
 Data sample selection.
 
#define THERMOSTAT4_SET_DATA_SAMPLE_MIDDLE   SET_SPI_DATA_SAMPLE_MIDDLE
 
#define THERMOSTAT4_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  thermostat4_return_value_t { THERMOSTAT4_OK = 0 , THERMOSTAT4_ERROR = -1 }
 Thermostat 4 Click return value data. More...
 

Functions

void thermostat4_cfg_setup (thermostat4_cfg_t *cfg)
 Thermostat 4 configuration object setup function.
 
err_t thermostat4_init (thermostat4_t *ctx, thermostat4_cfg_t *cfg)
 Thermostat 4 initialization function.
 
void thermostat4_relay_ctrl (thermostat4_t *ctx, uint8_t state)
 Relay Control.
 
void thermostat4_rst_pin_ctrl (thermostat4_t *ctx, uint8_t state)
 Sets reset pin state.
 
uint8_t thermostat4_hot_alert_state (thermostat4_t *ctx)
 Hot temperature alert.
 
uint8_t thermostat4_warm_alert_state (thermostat4_t *ctx)
 Warm temperature alert.
 
void thermostat4_set_warm_hysteresis (thermostat4_t *ctx, uint8_t hyst_data)
 Hysteresis on the Warm channel.
 
void thermostat4_new_cfg_upload (thermostat4_t *ctx)
 Reset module and upload new configuration on the Warm channel.
 

Enumeration Type Documentation

◆ thermostat4_return_value_t

Thermostat 4 Click return value data.

Predefined enum values for driver return values.

Enumerator
THERMOSTAT4_OK 
THERMOSTAT4_ERROR