/* Return temperature in degrees C of supplied voltage. 
The computation is based on a line running through 0 degrees K. We find the slope from the trimmed temperature calibration point. */
float am_hal_adc_volts_to_celsius(float fVoltage)
/* Return temperature in degrees C of supplied voltage. 
The computation is based on a line running through 0 degrees K. We find the slope from the trimmed temperature calibration point. */
float am_hal_adc_volts_to_celsius(float fVoltage)
{
    float fTemp;
    float fCalibration_temp = priv_temp_trims.flt.fCalibrationTemperature;
    float fCalibration_voltage = priv_temp_trims.flt.fCalibrationVoltage;
    float fCalibration_offset  = priv_temp_trims.flt.fCalibrationOffset;
    fTemp  = fCalibration_temp;
    fTemp /= (fCalibration_voltage - fCalibration_offset);
    fTemp *= (fVoltage - fCalibration_offset);
    return fTemp - 273.15f;
}