thermostat4
2.0.0.0
|
API for configuring and manipulating Thermostat 4 Click driver. More...
Modules | |
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. More... | |
err_t | thermostat4_init (thermostat4_t *ctx, thermostat4_cfg_t *cfg) |
Thermostat 4 initialization function. More... | |
void | thermostat4_generic_transfer (thermostat4_t *ctx, uint8_t *data_in, uint16_t wr_len, uint8_t *data_out, uint16_t rd_len) |
Generic transfer function. More... | |
void | thermostat4_relay_ctrl (thermostat4_t *ctx, uint8_t state) |
Relay Control. More... | |
void | thermostat4_rst_pin_ctrl (thermostat4_t *ctx, uint8_t state) |
Sets reset pin state. More... | |
uint8_t | thermostat4_hot_alert_state (thermostat4_t *ctx) |
Hot temperature ALERT. More... | |
uint8_t | thermostat4_warm_alert_state (thermostat4_t *ctx) |
Warm temperature ALERT. More... | |
void | thermostat4_set_warm_hysteresis (thermostat4_t *ctx, uint8_t hyst_data) |
Hysteresis on the Warm channel. More... | |
void | thermostat4_new_cfg_upload (thermostat4_t *ctx) |
Reset module and upload new configuration on the Warm channel. More... | |
API for configuring and manipulating Thermostat 4 Click driver.
void thermostat4_cfg_setup | ( | thermostat4_cfg_t * | cfg | ) |
Thermostat 4 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See thermostat4_cfg_t object definition for detailed explanation. |
void thermostat4_generic_transfer | ( | thermostat4_t * | ctx, |
uint8_t * | data_in, | ||
uint16_t | wr_len, | ||
uint8_t * | data_out, | ||
uint16_t | rd_len | ||
) |
Generic transfer function.
Generic SPI transfer, for sending and receiving packages.
[in] | ctx | : Click context object. See thermostat4_t object definition for detailed explanation. |
[in] | data_in | : Write data buffer. |
[in] | wr_len | : Number of byte in write data buffer. |
[out] | data_out | : Read data buffer. |
[in] | rd_len | : Number of byte in read data buffer. |
uint8_t thermostat4_hot_alert_state | ( | thermostat4_t * | ctx | ) |
Hot temperature ALERT.
This function read state from OA pin.
[in] | ctx | : Click context object. See thermostat4_t object definition for detailed explanation. |
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.
[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. |
0
- Success, -1
- Error.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.
[in] | ctx | : Click context object. See thermostat4_t object definition for detailed explanation. |
void thermostat4_relay_ctrl | ( | thermostat4_t * | ctx, |
uint8_t | state | ||
) |
Relay Control.
This function write desired state on RLY pin.
[in] | ctx | : Click context object. See thermostat4_t object definition for detailed explanation. |
[in] | state | : Relay ( ON or OFF state ). |
void thermostat4_rst_pin_ctrl | ( | thermostat4_t * | ctx, |
uint8_t | state | ||
) |
Sets reset pin state.
This function write desired state om RST pin.
[in] | ctx | : Click context object. See thermostat4_t object definition for detailed explanation. |
state | Reset ( 1 - ON or 0 - OFF state ). |
void thermostat4_set_warm_hysteresis | ( | thermostat4_t * | ctx, |
uint8_t | hyst_data | ||
) |
Hysteresis on the Warm channel.
This function write hysteresis data.
[in] | ctx | : Click context object. See thermostat4_t object definition for detailed explanation. |
[in] | hyst_data | : Potentiometer data 0 - 255. |
uint8_t thermostat4_warm_alert_state | ( | thermostat4_t * | ctx | ) |
Warm temperature ALERT.
This function read state from OB pin.
[in] | ctx | : Click context object. See thermostat4_t object definition for detailed explanation. |