thermostat 2.0.0.0
Functions

Functions

void thermostat_cfg_setup (thermostat_cfg_t *cfg)
 Config Object Initialization function. More...
 
THERMOSTAT_RETVAL thermostat_init (thermostat_t *ctx, thermostat_cfg_t *cfg)
 Initialization function. More...
 
void thermostat_generic_write (thermostat_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function. More...
 
void thermostat_generic_read (thermostat_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function. More...
 
void thermostat_write_data (thermostat_t *ctx, uint8_t reg_address, uint16_t write_data)
 Generic write 16-bit data function. More...
 
uint16_t thermostat_read_data (thermostat_t *ctx, uint8_t reg_address)
 Generic read 16-bit data function. More...
 
float thermostat_get_temperature (thermostat_t *ctx)
 Get temperature in degrees Celsius. More...
 
float thermostat_convert_fahrenheit (thermostat_t *ctx, float temp_celsius)
 Convert temperature in degrees Celsius to Fahrenheit. More...
 
void thermostat_set_configuration (thermostat_t *ctx, uint16_t config_value)
 Set configuration function. More...
 
void thermostat_set_temp_hyst (thermostat_t *ctx, int8_t temp_hyst)
 Set temperature hysterezis function. More...
 
void thermostat_set_temp_ref (thermostat_t *ctx, int8_t temp_ref)
 Set referent temperature function. More...
 
void thermostat_soft_reset (thermostat_t *ctx)
 Soft reset function. More...
 
void thermostat_switch_on (thermostat_t *ctx)
 Set on thermal switch function. More...
 
void thermostat_switch_off (thermostat_t *ctx)
 Set off thermal switch function. More...
 
void thermostat_enable (thermostat_t *ctx)
 Thermostat enabled function. More...
 
void thermostat_disable (thermostat_t *ctx)
 Thermostat disabled function. More...
 

Detailed Description

Function Documentation

◆ thermostat_cfg_setup()

void thermostat_cfg_setup ( thermostat_cfg_t cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ thermostat_convert_fahrenheit()

float thermostat_convert_fahrenheit ( thermostat_t ctx,
float  temp_celsius 
)

Convert temperature in degrees Celsius to Fahrenheit.

Parameters
ctxClick object.
temp_celsiusTemperature in celsius.

@description This function convert temperature in degrees Celsius to Fahrenheit.

◆ thermostat_disable()

void thermostat_disable ( thermostat_t ctx)

Thermostat disabled function.

Parameters
ctxClick object.

@description This function disabled thermostat

◆ thermostat_enable()

void thermostat_enable ( thermostat_t ctx)

Thermostat enabled function.

Parameters
ctxClick object.

@description This function enables thermostat.

◆ thermostat_generic_read()

void thermostat_generic_read ( thermostat_t ctx,
uint8_t  reg,
uint8_t *  data_buf,
uint8_t  len 
)

Generic read function.

Parameters
ctxClick object.
regRegister address.
data_bufOutput data buf.
lenNumber of the bytes to be read

@description This function reads data from the desired register.

◆ thermostat_generic_write()

void thermostat_generic_write ( thermostat_t ctx,
uint8_t  reg,
uint8_t *  data_buf,
uint8_t  len 
)

Generic write function.

Parameters
ctxClick object.
regRegister address.
data_bufData buf to be written.
lenNumber of the bytes in data buf.

@description This function writes data to the desired register.

◆ thermostat_get_temperature()

float thermostat_get_temperature ( thermostat_t ctx)

Get temperature in degrees Celsius.

Parameters
ctxClick object.

@description This function get temperature in degrees Celsius.

◆ thermostat_init()

THERMOSTAT_RETVAL thermostat_init ( thermostat_t ctx,
thermostat_cfg_t cfg 
)

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ thermostat_read_data()

uint16_t thermostat_read_data ( thermostat_t ctx,
uint8_t  reg_address 
)

Generic read 16-bit data function.

Parameters
ctxClick object.
regRegister address.

@description This function generic read 16-bit data.

◆ thermostat_set_configuration()

void thermostat_set_configuration ( thermostat_t ctx,
uint16_t  config_value 
)

Set configuration function.

Parameters
ctxClick object.
config_valueConfiguration value.

@description This function set configuration value.

◆ thermostat_set_temp_hyst()

void thermostat_set_temp_hyst ( thermostat_t ctx,
int8_t  temp_hyst 
)

Set temperature hysterezis function.

Parameters
ctxClick object.
temp_hystTemperature hysterezis.

@description This function set temperature hysterezis.

◆ thermostat_set_temp_ref()

void thermostat_set_temp_ref ( thermostat_t ctx,
int8_t  temp_ref 
)

Set referent temperature function.

Parameters
ctxClick object.
temp_refReferent temperature.

@description This function set referent temperature.

◆ thermostat_soft_reset()

void thermostat_soft_reset ( thermostat_t ctx)

Soft reset function.

Parameters
ctxClick object.

@description This function enables soft reset.

◆ thermostat_switch_off()

void thermostat_switch_off ( thermostat_t ctx)

Set off thermal switch function.

Parameters
ctxClick object.

@description This function set off thermal switch.

◆ thermostat_switch_on()

void thermostat_switch_on ( thermostat_t ctx)

Set on thermal switch function.

Parameters
ctxClick object.

@description This function set on thermal switch.

◆ thermostat_write_data()

void thermostat_write_data ( thermostat_t ctx,
uint8_t  reg_address,
uint16_t  write_data 
)

Generic write 16-bit data function.

Parameters
ctxClick object.
regRegister address.
write_dataData for write.

@description This function generic write 16-bit data.