You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
toaster-oven-bluepill/Core/Src/app_temp.h

48 lines
1.2 KiB

/**
* TODO file description
*/
#ifndef BLUEPILLTROUBA_APP_TEMP_H
#define BLUEPILLTROUBA_APP_TEMP_H
void app_analog_init();
float val_to_c(float val);
float c_to_val(float c);
void app_temp_set_calib_persistent(float a, float b);
void app_temp_set_calib_persistent_r(float lead, float reference);
void app_temp_backup_calib();
void app_temp_set_calib_temporary(float a, float b);
void app_temp_set_calib_temporary_r(float lead, float reference);
void app_temp_get_calib(float *a, float *b, float *l, float *r);
void app_temp_restore_calib();
/**
* Update temperature measurement.
*
* A slow float calculation is done here - call only when needed, at a roughly constant rate (e.g. 1s) to make smoothing work properly.
*
* The oven temp is further averaged internally.
*/
void app_temp_sample();
/// Read current oven temperature (celsius)
/// The value is valid after calling app_temp_sample()
float app_temp_read_oven();
/// Get the raw ADC value (divider voltage)
float app_temp_read_oven_raw();
/// Read current SOC temperature (celsius)
/// The value is valid after calling app_temp_sample()
float app_temp_read_soc();
void app_temp_adc_eos();
void app_temp_show_buf();
#endif //BLUEPILLTROUBA_APP_TEMP_H