thermostat 2.0.0.0
|
Functions | |
void | thermostat_cfg_setup (thermostat_cfg_t *cfg) |
Config Object Initialization function. | |
THERMOSTAT_RETVAL | thermostat_init (thermostat_t *ctx, thermostat_cfg_t *cfg) |
Initialization function. | |
void | thermostat_generic_write (thermostat_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | thermostat_generic_read (thermostat_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | thermostat_write_data (thermostat_t *ctx, uint8_t reg_address, uint16_t write_data) |
Generic write 16-bit data function. | |
uint16_t | thermostat_read_data (thermostat_t *ctx, uint8_t reg_address) |
Generic read 16-bit data function. | |
float | thermostat_get_temperature (thermostat_t *ctx) |
Get temperature in degrees Celsius. | |
float | thermostat_convert_fahrenheit (thermostat_t *ctx, float temp_celsius) |
Convert temperature in degrees Celsius to Fahrenheit. | |
void | thermostat_set_configuration (thermostat_t *ctx, uint16_t config_value) |
Set configuration function. | |
void | thermostat_set_temp_hyst (thermostat_t *ctx, int8_t temp_hyst) |
Set temperature hysterezis function. | |
void | thermostat_set_temp_ref (thermostat_t *ctx, int8_t temp_ref) |
Set referent temperature function. | |
void | thermostat_soft_reset (thermostat_t *ctx) |
Soft reset function. | |
void | thermostat_switch_on (thermostat_t *ctx) |
Set on thermal switch function. | |
void | thermostat_switch_off (thermostat_t *ctx) |
Set off thermal switch function. | |
void | thermostat_enable (thermostat_t *ctx) |
Thermostat enabled function. | |
void | thermostat_disable (thermostat_t *ctx) |
Thermostat disabled function. | |
void thermostat_cfg_setup | ( | thermostat_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
float thermostat_convert_fahrenheit | ( | thermostat_t * | ctx, |
float | temp_celsius ) |
Convert temperature in degrees Celsius to Fahrenheit.
ctx | Click object. |
temp_celsius | Temperature in celsius. |
@description This function convert temperature in degrees Celsius to Fahrenheit.
void thermostat_disable | ( | thermostat_t * | ctx | ) |
Thermostat disabled function.
ctx | Click object. |
@description This function disabled thermostat
void thermostat_enable | ( | thermostat_t * | ctx | ) |
Thermostat enabled function.
ctx | Click object. |
@description This function enables thermostat.
void thermostat_generic_read | ( | thermostat_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf. |
len | Number of the bytes to be read |
@description This function reads data from the desired register.
void thermostat_generic_write | ( | thermostat_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function writes data to the desired register.
float thermostat_get_temperature | ( | thermostat_t * | ctx | ) |
Get temperature in degrees Celsius.
ctx | Click object. |
@description This function get temperature in degrees Celsius.
THERMOSTAT_RETVAL thermostat_init | ( | thermostat_t * | ctx, |
thermostat_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint16_t thermostat_read_data | ( | thermostat_t * | ctx, |
uint8_t | reg_address ) |
Generic read 16-bit data function.
ctx | Click object. |
reg | Register address. |
@description This function generic read 16-bit data.
void thermostat_set_configuration | ( | thermostat_t * | ctx, |
uint16_t | config_value ) |
Set configuration function.
ctx | Click object. |
config_value | Configuration value. |
@description This function set configuration value.
void thermostat_set_temp_hyst | ( | thermostat_t * | ctx, |
int8_t | temp_hyst ) |
Set temperature hysterezis function.
ctx | Click object. |
temp_hyst | Temperature hysterezis. |
@description This function set temperature hysterezis.
void thermostat_set_temp_ref | ( | thermostat_t * | ctx, |
int8_t | temp_ref ) |
Set referent temperature function.
ctx | Click object. |
temp_ref | Referent temperature. |
@description This function set referent temperature.
void thermostat_soft_reset | ( | thermostat_t * | ctx | ) |
Soft reset function.
ctx | Click object. |
@description This function enables soft reset.
void thermostat_switch_off | ( | thermostat_t * | ctx | ) |
Set off thermal switch function.
ctx | Click object. |
@description This function set off thermal switch.
void thermostat_switch_on | ( | thermostat_t * | ctx | ) |
Set on thermal switch function.
ctx | Click object. |
@description This function set on thermal switch.
void thermostat_write_data | ( | thermostat_t * | ctx, |
uint8_t | reg_address, | ||
uint16_t | write_data ) |
Generic write 16-bit data function.
ctx | Click object. |
reg | Register address. |
write_data | Data for write. |
@description This function generic write 16-bit data.