Adapter that bridges BaseAdc to the ntc::AdcInterface CRTP interface required by the NtcThermistor template class.
More...
#include <NtcTemperatureHandler.h>
Adapter that bridges BaseAdc to the ntc::AdcInterface CRTP interface required by the NtcThermistor template class.
NtcThermistor<AdcType> requires AdcType to inherit from ntc::AdcInterface<AdcType>. BaseAdc uses a separate virtual interface. This adapter translates between them.
◆ NtcAdcAdapter()
| NtcAdcAdapter::NtcAdcAdapter |
( |
BaseAdc * | adc, |
|
|
float | ref_voltage = 3.3f, |
|
|
uint8_t | res_bits = 12 ) |
|
inlineexplicitnoexcept |
Construct adapter wrapping a BaseAdc pointer.
- Parameters
-
| adc | Pointer to BaseAdc (must outlive this adapter). |
| ref_voltage | ADC reference voltage in volts. |
| res_bits | ADC resolution in bits. |
◆ EnsureInitialized()
| bool NtcAdcAdapter::EnsureInitialized |
( |
| ) |
|
|
inline |
◆ GetReferenceVoltage()
| float NtcAdcAdapter::GetReferenceVoltage |
( |
| ) |
const |
|
inline |
◆ GetResolutionBits()
| uint8_t NtcAdcAdapter::GetResolutionBits |
( |
| ) |
const |
|
inline |
◆ IsChannelAvailable()
| bool NtcAdcAdapter::IsChannelAvailable |
( |
uint8_t | channel | ) |
const |
|
inline |
◆ IsInitialized()
| bool NtcAdcAdapter::IsInitialized |
( |
| ) |
const |
|
inline |
◆ ReadChannelCount()
| ntc::AdcError NtcAdcAdapter::ReadChannelCount |
( |
uint8_t | channel, |
|
|
uint32_t * | count ) |
|
inline |
◆ ReadChannelV()
| ntc::AdcError NtcAdcAdapter::ReadChannelV |
( |
uint8_t | channel, |
|
|
float * | voltage_v ) |
|
inline |
◆ adc_
| BaseAdc* NtcAdcAdapter::adc_ |
|
private |
◆ reference_voltage_
| float NtcAdcAdapter::reference_voltage_ |
|
private |
◆ resolution_bits_
| uint8_t NtcAdcAdapter::resolution_bits_ |
|
private |
The documentation for this class was generated from the following file: