230 #if TS_VISHAY_NTCALUG01A103G_POSITION_IN_RESISTOR_DIVIDER_IS_R_1 == true
231 #define TS_VISHAY_NTCALUG01A103G_ADC_VOLTAGE_V_MAX_V \
232 (float)((TS_VISHAY_NTCALUG01A103G_RESISTOR_DIVIDER_SUPPLY_VOLTAGE_V * ts_ntcalug01a103gLut[ts_ntcalug01a103gLutSize-1].resistance_Ohm) / (ts_ntcalug01a103gLut[ts_ntcalug01a103gLutSize-1].resistance_Ohm+TS_VISHAY_NTCALUG01A103G_RESISTOR_DIVIDER_RESISTANCE_R_1_R_2_Ohm))
233 #define TS_VISHAY_NTCALUG01A103G_ADC_VOLTAGE_V_MIN_V \
234 (float)((TS_VISHAY_NTCALUG01A103G_RESISTOR_DIVIDER_SUPPLY_VOLTAGE_V * ts_ntcalug01a103gLut[0].resistance_Ohm) / (ts_ntcalug01a103gLut[0].resistance_Ohm+TS_VISHAY_NTCALUG01A103G_RESISTOR_DIVIDER_RESISTANCE_R_1_R_2_Ohm))
236 #define TS_VISHAY_NTCALUG01A103G_ADC_VOLTAGE_V_MIN_V \
237 (float)((TS_VISHAY_NTCALUG01A103G_RESISTOR_DIVIDER_SUPPLY_VOLTAGE_V * ts_ntcalug01a103gLut[ts_ntcalug01a103gLutSize-1].resistance_Ohm) / (ts_ntcalug01a103gLut[ts_ntcalug01a103gLutSize-1].resistance_Ohm+TS_VISHAY_NTCALUG01A103G_RESISTOR_DIVIDER_RESISTANCE_R_1_R_2_Ohm))
238 #define TS_VISHAY_NTCALUG01A103G_ADC_VOLTAGE_V_MAX_V \
239 (float)((TS_VISHAY_NTCALUG01A103G_RESISTOR_DIVIDER_SUPPLY_VOLTAGE_V * ts_ntcalug01a103gLut[0].resistance_Ohm) / (ts_ntcalug01a103gLut[0].resistance_Ohm+TS_VISHAY_NTCALUG01A103G_RESISTOR_DIVIDER_RESISTANCE_R_1_R_2_Ohm))
250 int16_t temperature_ddegC = 0;
251 float resistance_Ohm = 0.0;
252 float adcVoltage_V = adcVoltage_mV / 1000.0;
257 temperature_ddegC = INT16_MIN;
260 temperature_ddegC = INT16_MAX;
263 #if TS_VISHAY_NTCALUG01A103G_POSITION_IN_RESISTOR_DIVIDER_IS_R_1 == true
274 uint16_t between_high = 0;
275 uint16_t between_low = 0;
278 between_low = i + 1u;
284 if (!(((between_high == 0u) && (between_low == 0u)) ||
296 return temperature_ddegC;
300 int16_t temperature_ddegC = 0;
302 return temperature_ddegC;
float MATH_linearInterpolation(float x1, float y1, float x2, float y2, float x_interpolate)
Linear inter-/extrapolates a third point according to two given points.
math library for often used math functions
#define TS_VISHAY_NTCALUG01A103G_ADC_VOLTAGE_V_MIN_V
int16_t TS_Vis00GetTemperatureFromPolynomial(uint16_t adcVoltage_mV)
returns temperature based on measured ADC voltage
#define TS_VISHAY_NTCALUG01A103G_ADC_VOLTAGE_V_MAX_V
static const uint16_t ts_ntcalug01a103gLutSize
int16_t TS_Vis00GetTemperatureFromLut(uint16_t adcVoltage_mV)
returns temperature based on measured ADC voltage.
static const TS_TEMPERATURE_SENSOR_LUT_s ts_ntcalug01a103gLut[]
Resistive divider used for measuring temperature.
#define TS_VISHAY_NTCALUG01A103G_RESISTOR_DIVIDER_SUPPLY_VOLTAGE_V
#define TS_VISHAY_NTCALUG01A103G_RESISTOR_DIVIDER_RESISTANCE_R_1_R_2_Ohm