thermostat4 2.0.0.0
Thermostat 4 Click Driver

API for configuring and manipulating Thermostat 4 Click driver. More...

Topics

 Thermostat 4 Registers Settings
 Settings for registers of Thermostat 4 Click driver.
 
 Thermostat 4 MikroBUS Map
 MikroBUS pin mapping of Thermostat 4 Click driver.
 

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.
 

Detailed Description

API for configuring and manipulating Thermostat 4 Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ thermostat4_cfg_setup()

void thermostat4_cfg_setup ( thermostat4_cfg_t * cfg)

Thermostat 4 configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See thermostat4_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ thermostat4_hot_alert_state()

uint8_t thermostat4_hot_alert_state ( thermostat4_t * ctx)

Hot temperature alert.

This function read state from OA pin.

Parameters
[in]ctx: Click context object. See thermostat4_t object definition for detailed explanation.
Returns
Alert( 0 - ON or 1 - OFF state ).

◆ thermostat4_init()

err_t thermostat4_init ( thermostat4_t * ctx,
thermostat4_cfg_t * cfg )

Thermostat 4 initialization function.

This function initializes all necessary pins and peripherals used for this click board.

Parameters
[out]ctx: Click context object. See thermostat4_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See thermostat4_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error. See #err_t definition for detailed explanation.

◆ thermostat4_new_cfg_upload()

void thermostat4_new_cfg_upload ( thermostat4_t * ctx)

Reset module and upload new configuration on the Warm channel.

This function reset module and upload new configuration on the Warm channel.

Parameters
[in]ctx: Click context object. See thermostat4_t object definition for detailed explanation.
Returns
Nothing.

◆ thermostat4_relay_ctrl()

void thermostat4_relay_ctrl ( thermostat4_t * ctx,
uint8_t state )

Relay Control.

This function write desired state on RLY pin.

Parameters
[in]ctx: Click context object. See thermostat4_t object definition for detailed explanation.
[in]state: Relay ( ON or OFF state ).
Returns
Nothing.

◆ thermostat4_rst_pin_ctrl()

void thermostat4_rst_pin_ctrl ( thermostat4_t * ctx,
uint8_t state )

Sets reset pin state.

This function write desired state om RST pin.

Parameters
[in]ctx: Click context object. See thermostat4_t object definition for detailed explanation.
stateReset ( 1 - ON or 0 - OFF state ).
Returns
Nothing.

◆ thermostat4_set_warm_hysteresis()

void thermostat4_set_warm_hysteresis ( thermostat4_t * ctx,
uint8_t hyst_data )

Hysteresis on the Warm channel.

This function write hysteresis data.

Parameters
[in]ctx: Click context object. See thermostat4_t object definition for detailed explanation.
[in]hyst_data: Potentiometer data 0 - 255.
Returns
Nothing.

◆ thermostat4_warm_alert_state()

uint8_t thermostat4_warm_alert_state ( thermostat4_t * ctx)

Warm temperature alert.

This function read state from OB pin.

Parameters
[in]ctx: Click context object. See thermostat4_t object definition for detailed explanation.
Returns
Alert( 0 - ON or 1 - OFF state ).