HardFOC Core
API reference
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Mcp9700AdcAdapter Class Reference

Thin adapter: BaseAdc channel read in the shape expected by Mcp9700Thermistor<>. More...

#include <Mcp9700TemperatureHandler.h>

Public Member Functions

 Mcp9700AdcAdapter (BaseAdc *adc) noexcept
 
bool EnsureInitialized () noexcept
 
int ReadChannelV (uint8_t channel, float *voltage_v) noexcept
 Read one ADC channel as volts for the thermistor conversion.
 

Private Attributes

BaseAdc * adc_
 

Detailed Description

Thin adapter: BaseAdc channel read in the shape expected by Mcp9700Thermistor<>.

Constructor & Destructor Documentation

◆ Mcp9700AdcAdapter()

Mcp9700AdcAdapter::Mcp9700AdcAdapter ( BaseAdc *  adc)
inlineexplicitnoexcept
Parameters
adcHost ADC; must outlive this adapter.

Member Function Documentation

◆ EnsureInitialized()

bool Mcp9700AdcAdapter::EnsureInitialized ( )
inlinenoexcept

◆ ReadChannelV()

int Mcp9700AdcAdapter::ReadChannelV ( uint8_t  channel,
float *  voltage_v 
)
inlinenoexcept

Read one ADC channel as volts for the thermistor conversion.

Parameters
channelLogical ADC channel bound to this MCP9700.
voltage_vOutput voltage in volts.
Returns
0 on success (matches Mcp9700Thermistor<> driver template).

Member Data Documentation

◆ adc_

BaseAdc* Mcp9700AdcAdapter::adc_
private

The documentation for this class was generated from the following file: