FSM thermostat
|
Header file for the temperature sensor port layer. More...
Go to the source code of this file.
Data Structures | |
struct | port_temp_hw_t |
Structure to define the HW dependencies of a temperature sensor. More... | |
Macros | |
#define | TEMP_SENSOR_THERMOSTAT_GPIO GPIOA |
#define | TEMP_SENSOR_THERMOSTAT_PIN 0 |
#define | TEMP_SENSOR_THERMOSTAT_ADC ADC1 |
#define | TEMP_SENSOR_THERMOSTAT_ADC_CHANNEL 0 |
Functions | |
double | port_temp_sensor_get_temperature (port_temp_hw_t *pir_sensor) |
Gets the temperature in Celsius of the temperature sensor. More... | |
void | port_temp_sensor_save_adc_value (port_temp_hw_t *p_temp, double adc_value) |
Saves the ADC value of the temperature sensor and converts it to Celsius. More... | |
void | port_temp_sensor_init (port_temp_hw_t *pir_sensor) |
Initializes the temperature sensor. More... | |
Variables | |
port_temp_hw_t | temp_sensor_thermostat |
Header file for the temperature sensor port layer.
Definition in file port_temp_sensor.h.
#define TEMP_SENSOR_THERMOSTAT_ADC ADC1 |
ADC of the temperature sensor in the Nucleo board
Definition at line 24 of file port_temp_sensor.h.
#define TEMP_SENSOR_THERMOSTAT_ADC_CHANNEL 0 |
ADC channel of the temperature sensor in the Nucleo board
Definition at line 25 of file port_temp_sensor.h.
#define TEMP_SENSOR_THERMOSTAT_GPIO GPIOA |
GPIO port of the temperature sensor in the Nucleo board
Definition at line 22 of file port_temp_sensor.h.
#define TEMP_SENSOR_THERMOSTAT_PIN 0 |
GPIO pin of the temperature sensor in the Nucleo board
Definition at line 23 of file port_temp_sensor.h.
double port_temp_sensor_get_temperature | ( | port_temp_hw_t * | pir_sensor | ) |
Gets the temperature in Celsius of the temperature sensor.
Definition at line 37 of file port_temp_sensor.c.
void port_temp_sensor_init | ( | port_temp_hw_t * | pir_sensor | ) |
Initializes the temperature sensor.
pir_sensor | Pointer to the temperature sensor structure. |
Definition at line 52 of file port_temp_sensor.c.
void port_temp_sensor_save_adc_value | ( | port_temp_hw_t * | p_temp, |
double | adc_value | ||
) |
Saves the ADC value of the temperature sensor and converts it to Celsius.
p_temp | Pointer to the temperature sensor structure. |
adc_value | ADC value of the temperature sensor. |
Definition at line 42 of file port_temp_sensor.c.
port_temp_hw_t temp_sensor_thermostat |
Temperature sensor of the thermostat system. Public for access to interrupt handlers.
Definition at line 20 of file port_temp_sensor.c.