tempsensors.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * tempsensors.h
  3. *
  4. * Created on: Jan 12, 2021
  5. * Author: David Original work by Jose (PTDreamer), 2017
  6. */
  7. #ifndef GENERALIO_TEMPSENSORS_H_
  8. #define GENERALIO_TEMPSENSORS_H_
  9. #include "main.h"
  10. #include "adc_global.h"
  11. #include "settings.h"
  12. #include "iron.h"
  13. #define update_reading 1
  14. #define stored_reading 0
  15. #define read_Avg 0
  16. #define read_Raw 1
  17. extern uint16_t last_TIP_Raw;
  18. extern uint16_t last_TIP;
  19. extern int16_t last_NTC;
  20. int16_t readColdJunctionSensorTemp_C_x10(void);
  21. uint16_t coldJunctionTemp_mC_To_uV(int tempX10);
  22. uint16_t readIntTemp_mC(void);
  23. uint16_t readTipSensorADC_Avg(void);
  24. int16_t readColdJunctionSensorTemp_x10(bool tempUnit);
  25. uint16_t readTipTemperatureCompensated(bool update, bool ReadRaw);
  26. uint16_t realTempToADC(uint16_t real);
  27. void setCurrentTip(uint8_t tip);
  28. tipData* getCurrentTip();
  29. long map(long x, long in_min, long in_max, long out_min, long out_max);
  30. int16_t adc2Human(uint16_t adc_value,bool correction, bool tempUnit);
  31. uint16_t human2adc(int16_t t);
  32. int16_t TempConversion(int16_t temperature, bool conversion, bool x10mode);
  33. #endif /* GENERALIO_TEMPSENSORS_H_ */