HVAC_M7_ADC_TEMP/ADC_Temp_Fast.h

24 lines
632 B
C

//
// Created by cfif on 06.05.2026.
//
#ifndef HVAC_M7_ADC_TEMP_FAST_H
#define HVAC_M7_ADC_TEMP_FAST_H
#include "stdint.h"
// Структура для точки таблицы
typedef struct {
uint16_t adc;
int16_t temp;
float resistance;
} TablePoint;
extern const TablePoint temperature_table_duct_KST45_table_3000[];
extern const TablePoint temperature_table_duct_KST45_table_20000[];
float get_temperature_by_adc(const TablePoint* table, int table_size, int adc_value);
float get_resistance_by_temperature_linear(const TablePoint* table, int table_size, float temperature);
#endif //HVAC_M7_ADC_TEMP_FAST_H