thermostat5
2.1.0.0
|
API for configuring and manipulating Thermostat 5 Click driver. More...
Modules | |
Thermostat 5 Registers Settings | |
Settings for registers of Thermostat 5 Click driver. | |
Thermostat 5 MikroBUS Map | |
MikroBUS pin mapping of Thermostat 5 Click driver. | |
Functions | |
void | thermostat5_cfg_setup (thermostat5_cfg_t *cfg) |
Thermostat 5 configuration object setup function. More... | |
void | thermostat5_drv_interface_sel (thermostat5_cfg_t *cfg, thermostat5_drv_t drv_sel) |
Thermostat 5 driver interface setup function. More... | |
err_t | thermostat5_init (thermostat5_t *ctx, thermostat5_cfg_t *cfg) |
Thermostat 5 initialization function. More... | |
err_t | thermostat5_read_raw_adc (thermostat5_t *ctx, uint16_t *raw_adc) |
Thermostat 5 read raw ADC value function. More... | |
err_t | thermostat5_read_voltage (thermostat5_t *ctx, float *voltage) |
Thermostat 5 read voltage level function. More... | |
err_t | thermostat5_set_vref (thermostat5_t *ctx, float vref) |
Thermostat 5 set vref function. More... | |
err_t | thermostat5_get_temperature (thermostat5_t *ctx, float *temperature) |
Thermostat 5 get temperature function. More... | |
void | thermostat5_set_relay (thermostat5_t *ctx, uint8_t state) |
Thermostat 5 set relay function. More... | |
API for configuring and manipulating Thermostat 5 Click driver.
void thermostat5_cfg_setup | ( | thermostat5_cfg_t * | cfg | ) |
Thermostat 5 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See thermostat5_cfg_t object definition for detailed explanation. |
void thermostat5_drv_interface_sel | ( | thermostat5_cfg_t * | cfg, |
thermostat5_drv_t | drv_sel | ||
) |
Thermostat 5 driver interface setup function.
This function sets a serial driver interface which will be used further in the click driver.
[out] | cfg | : Click configuration structure. See thermostat5_cfg_t object definition for detailed explanation. |
[in] | drv_sel | : Driver interface selection. See thermostat5_drv_t object definition for detailed explanation. |
err_t thermostat5_get_temperature | ( | thermostat5_t * | ctx, |
float * | temperature | ||
) |
Thermostat 5 get temperature function.
This function reads and calculates temperature in degrees Celsius [degC] using NTC thermistors.
[in] | ctx | : Click context object. See thermostat5_t object definition for detailed explanation. |
[out] | temperature | : Temperature [degC]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thermostat5_init | ( | thermostat5_t * | ctx, |
thermostat5_cfg_t * | cfg | ||
) |
Thermostat 5 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See thermostat5_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See thermostat5_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thermostat5_read_raw_adc | ( | thermostat5_t * | ctx, |
uint16_t * | raw_adc | ||
) |
Thermostat 5 read raw ADC value function.
This function reads raw ADC value.
[in] | ctx | : Click context object. See thermostat5_t object definition for detailed explanation. |
[out] | raw_adc | : Output ADC result. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thermostat5_read_voltage | ( | thermostat5_t * | ctx, |
float * | voltage | ||
) |
Thermostat 5 read voltage level function.
This function reads raw ADC value and converts it to proportional voltage level.
[in] | ctx | : Click context object. See thermostat5_t object definition for detailed explanation. |
[out] | voltage | : Output voltage level [V]. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. void thermostat5_set_relay | ( | thermostat5_t * | ctx, |
uint8_t | state | ||
) |
Thermostat 5 set relay function.
This function controls the relay by setting the state of the ON (PWM) pin.
[in] | ctx | : Click context object. See thermostat5_t object definition for detailed explanation. |
[out] | state | : Relay ON/OFF state. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t thermostat5_set_vref | ( | thermostat5_t * | ctx, |
float | vref | ||
) |
Thermostat 5 set vref function.
This function sets the voltage reference for Thermostat 5 click driver.
[in] | ctx | : Click context object. See thermostat5_t object definition for detailed explanation. |
[in] | vref | : Reference voltage (volts). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.