|
NTC Thermistor Driver
API reference
|
Type definitions for NTC thermistor driver. More...
#include <cstdint>Go to the source code of this file.
Classes | |
| struct | ntc_config_t |
| NTC thermistor configuration structure. More... | |
| struct | ntc_reading_t |
| NTC thermistor reading structure. More... | |
Namespaces | |
| namespace | NTC |
| namespace | NTC::DefaultConfig |
| Default NTC configuration constants. | |
Enumerations | |
| enum class | NtcError : uint8_t { Success = 0 , Failure = 1 , NotInitialized = 2 , AlreadyInitialized = 3 , InvalidParameter = 4 , NullPointer = 5 , OutOfMemory = 6 , AdcReadFailed = 7 , InvalidResistance = 8 , TemperatureOutOfRange = 9 , LookupTableError = 10 , ConversionFailed = 11 , CalibrationFailed = 12 , UnsupportedOperation = 13 , Timeout = 14 , HardwareFault = 15 , Max = 16 } |
| NTC thermistor error codes. More... | |
| enum class | NtcType : uint8_t { Unknown = 0 , NtcG163Jft103Ft1S = 1 , NtcG164Jf103Ft1S = 2 , NtcG163Jf103Ft1S = 3 , Custom = 4 , Max = 5 } |
| NTC thermistor types. More... | |
| enum class | NtcConversionMethod : uint8_t { LookupTable = 0 , Mathematical = 1 , Auto = 2 } |
| Temperature conversion methods. More... | |
Functions | |
| constexpr ntc_config_t | GetDefaultNtcG163Jft103Ft1SConfig () noexcept |
| Default NTC configuration for NTCG163JFT103FT1S. | |
| constexpr ntc_config_t | GetDefaultNtcConfig () noexcept |
| Default NTC configuration. | |
Variables | |
| constexpr float | NTC::DefaultConfig::DEFAULT_RESISTANCE_AT_25C_ |
| Default resistance at 25°C (10kΩ) | |
| constexpr float | NTC::DefaultConfig::DEFAULT_BETA_VALUE_ = 3435.0F |
| Default beta value (3435K) | |
| constexpr float | NTC::DefaultConfig::DEFAULT_REFERENCE_VOLTAGE_ |
| Default reference voltage (3.3V) | |
| constexpr float | NTC::DefaultConfig::DEFAULT_SERIES_RESISTANCE_ |
| Default series resistance (10kΩ) | |
| constexpr float | NTC::DefaultConfig::DEFAULT_CALIBRATION_OFFSET_ |
| Default calibration offset. | |
| constexpr uint8_t | NTC::DefaultConfig::DEFAULT_ADC_CHANNEL_ = 0 |
| Default ADC channel. | |
| constexpr uint32_t | NTC::DefaultConfig::DEFAULT_ADC_RESOLUTION_BITS_ |
| Default ADC resolution (12-bit) | |
| constexpr uint32_t | NTC::DefaultConfig::DEFAULT_SAMPLE_COUNT_ = 1U |
| Default sample count. | |
| constexpr uint32_t | NTC::DefaultConfig::DEFAULT_SAMPLE_DELAY_MS_ = 0U |
| Default sample delay (ms) | |
| constexpr float | NTC::DefaultConfig::DEFAULT_MIN_TEMPERATURE_ |
| Default minimum temperature (°C) | |
| constexpr float | NTC::DefaultConfig::DEFAULT_MAX_TEMPERATURE_ |
| Default maximum temperature (°C) | |
| constexpr bool | NTC::DefaultConfig::DEFAULT_ENABLE_FILTERING_ = false |
| Default filtering enabled. | |
| constexpr float | NTC::DefaultConfig::DEFAULT_FILTER_ALPHA_ = 0.1F |
| Default filter alpha value. | |
Type definitions for NTC thermistor driver.
|
strong |
Temperature conversion methods.
Methods for converting resistance to temperature. The driver supports two conversion approaches with different trade-offs:
| Enumerator | |
|---|---|
| LookupTable | Use lookup table (faster, less accurate) |
| Mathematical | Use mathematical conversion (slower, more accurate) |
| Auto | Auto-select based on accuracy requirements. |
|
strong |
NTC thermistor error codes.
Error codes returned by NTC thermistor driver functions. All functions that can fail return an NtcError value indicating success or the specific error condition.
|
strong |
NTC thermistor types.
Supported NTC thermistor types. Each type has predefined characteristics (resistance at 25°C, beta value) that are automatically configured when using the type-specific constructor.
| Enumerator | |
|---|---|
| Unknown | Unknown type. |
| NtcG163Jft103Ft1S | NTCG163JFT103FT1S (10kΩ @ 25°C, β=3435K) |
| NtcG164Jf103Ft1S | NTCG164JF103FT1S (10kΩ @ 25°C, β=3435K) |
| NtcG163Jf103Ft1S | NTCG163JF103FT1S (10kΩ @ 25°C, β=3435K) |
| Custom | Custom NTC type. |
| Max | Maximum type. |
|
constexprnoexcept |
Default NTC configuration.
Convenience function that defaults to NTCG163JFT103FT1S configuration. Equivalent to GetDefaultNtcG163Jft103Ft1SConfig().
|
constexprnoexcept |
Default NTC configuration for NTCG163JFT103FT1S.
Initializes a configuration structure with default values for the NTCG163JFT103FT1S thermistor (10kΩ @ 25°C, β=3435K).