Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
thermistor.h@2:bcfa5a2f21c9, 2021-03-19 (annotated)
- Committer:
 - mahphalke
 - Date:
 - Fri Mar 19 08:09:19 2021 +0000
 - Revision:
 - 2:bcfa5a2f21c9
 - Parent:
 - 1:f65f6fadda5d
 
Fixed line ending issues
Who changed what in which revision?
| User | Revision | Line number | New contents of line | 
|---|---|---|---|
| mahphalke | 1:f65f6fadda5d | 1 | /*! | 
| mahphalke | 1:f65f6fadda5d | 2 | ***************************************************************************** | 
| mahphalke | 1:f65f6fadda5d | 3 | @file: thermistor.h | 
| mahphalke | 1:f65f6fadda5d | 4 | |
| mahphalke | 1:f65f6fadda5d | 5 | @brief: | 
| mahphalke | 1:f65f6fadda5d | 6 | |
| mahphalke | 1:f65f6fadda5d | 7 | @details: | 
| mahphalke | 1:f65f6fadda5d | 8 | ----------------------------------------------------------------------------- | 
| mahphalke | 1:f65f6fadda5d | 9 | Copyright (c) 2021 Analog Devices, Inc. All rights reserved. | 
| mahphalke | 1:f65f6fadda5d | 10 | |
| mahphalke | 1:f65f6fadda5d | 11 | This software is proprietary to Analog Devices, Inc. and its licensors. | 
| mahphalke | 1:f65f6fadda5d | 12 | By using this software you agree to the terms of the associated | 
| mahphalke | 1:f65f6fadda5d | 13 | Analog Devices Software License Agreement. | 
| mahphalke | 1:f65f6fadda5d | 14 | |
| mahphalke | 1:f65f6fadda5d | 15 | *****************************************************************************/ | 
| mahphalke | 1:f65f6fadda5d | 16 | |
| mahphalke | 1:f65f6fadda5d | 17 | #include <stdint.h> | 
| mahphalke | 1:f65f6fadda5d | 18 | |
| mahphalke | 1:f65f6fadda5d | 19 | #ifndef _THERMISTOR_H_ | 
| mahphalke | 1:f65f6fadda5d | 20 | #define _THERMISTOR_H_ | 
| mahphalke | 1:f65f6fadda5d | 21 | |
| mahphalke | 1:f65f6fadda5d | 22 | /* Enable this macro to use look-up tables for temperature conversion */ | 
| mahphalke | 1:f65f6fadda5d | 23 | #define DEFINE_LOOKUP_TABLES | 
| mahphalke | 1:f65f6fadda5d | 24 | |
| mahphalke | 1:f65f6fadda5d | 25 | class thermistor | 
| mahphalke | 1:f65f6fadda5d | 26 | { | 
| mahphalke | 1:f65f6fadda5d | 27 | public: | 
| mahphalke | 1:f65f6fadda5d | 28 | thermistor(); | 
| mahphalke | 1:f65f6fadda5d | 29 | ~thermistor(); | 
| mahphalke | 1:f65f6fadda5d | 30 | static float lookup(const uint32_t *lut, | 
| mahphalke | 1:f65f6fadda5d | 31 | uint32_t resistance, | 
| mahphalke | 1:f65f6fadda5d | 32 | uint16_t size, | 
| mahphalke | 1:f65f6fadda5d | 33 | int16_t offset); | 
| mahphalke | 1:f65f6fadda5d | 34 | static float convert(const float resistance, float coeff_A, float coeff_B, | 
| mahphalke | 1:f65f6fadda5d | 35 | float coeff_C); | 
| mahphalke | 1:f65f6fadda5d | 36 | virtual float convert(const float resistance) = 0; | 
| mahphalke | 1:f65f6fadda5d | 37 | virtual float lookup(const float resistance) = 0; | 
| mahphalke | 1:f65f6fadda5d | 38 | }; | 
| mahphalke | 1:f65f6fadda5d | 39 | |
| mahphalke | 1:f65f6fadda5d | 40 | #endif /* _THERMISTOR_H_ */ |