Go to the documentation of this file.
35 #include "drv_digital_out.h"
36 #include "drv_digital_in.h"
37 #include "drv_spi_master.h"
59 #define THERMOSTAT4_RELAY_ON 0x01
60 #define THERMOSTAT4_RELAY_OFF 0x00
62 #define THERMOSTAT4_RESET_ON 0x01
63 #define THERMOSTAT4_RESET_OFF 0x00
65 #define THERMOSTAT4_WARM_ALERT 0x00
66 #define THERMOSTAT4_HOT_ALERT 0x00
76 #define THERMOSTAT4_SET_DATA_SAMPLE_EDGE SET_SPI_DATA_SAMPLE_EDGE
77 #define THERMOSTAT4_SET_DATA_SAMPLE_MIDDLE SET_SPI_DATA_SAMPLE_MIDDLE
95 #define THERMOSTAT4_MAP_MIKROBUS( cfg, mikrobus ) \
96 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
97 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
98 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
99 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
100 cfg.oa = MIKROBUS( mikrobus, MIKROBUS_AN ); \
101 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
102 cfg.rly = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
103 cfg.ob = MIKROBUS( mikrobus, MIKROBUS_INT )
126 pin_name_t chip_select;
150 spi_master_mode_t spi_mode;
151 spi_master_chip_select_polarity_t cs_polarity;
210 uint8_t *data_out, uint16_t rd_len );
272 #endif // _THERMOSTAT4_H_
void thermostat4_new_cfg_upload(thermostat4_t *ctx)
Reset module and upload new configuration on the Warm channel.
uint8_t thermostat4_hot_alert_state(thermostat4_t *ctx)
Hot temperature ALERT.
Thermostat 4 Click configuration object.
Definition: thermostat4.h:133
void thermostat4_relay_ctrl(thermostat4_t *ctx, uint8_t state)
Relay Control.
void thermostat4_cfg_setup(thermostat4_cfg_t *cfg)
Thermostat 4 configuration object setup function.
void thermostat4_rst_pin_ctrl(thermostat4_t *ctx, uint8_t state)
Sets reset pin state.
Definition: thermostat4.h:161
thermostat4_return_value_t
Thermostat 4 Click return value data.
Definition: thermostat4.h:158
Definition: thermostat4.h:160
uint8_t thermostat4_warm_alert_state(thermostat4_t *ctx)
Warm temperature ALERT.
Thermostat 4 Click context object.
Definition: thermostat4.h:111
err_t thermostat4_init(thermostat4_t *ctx, thermostat4_cfg_t *cfg)
Thermostat 4 initialization function.
void thermostat4_set_warm_hysteresis(thermostat4_t *ctx, uint8_t hyst_data)
Hysteresis on the Warm channel.
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.