modm API documentation
modm::max31865< SpiMaster, Cs, pt > Class Template Reference

#include <modm/driver/temperature/max31865.hpp>

Inheritance diagram for modm::max31865< SpiMaster, Cs, pt >:
modm::SpiDevice< SpiMaster > modm::NestedResumable< 3 >

Classes

struct  Data
 
struct  Pt
 

Public Typedefs

using FaultDetectionWrite_t = (Config) enum class FaultDetectionWrite Configuration< Config_t, FaultDetectionWrite, 0b11, 2 >
 
using FaultDetectionRead_t = Configuration< Config_t, FaultDetectionRead, 0b11, 2 >
 
using Rejection_t = Configuration< Config_t, Rejection, 0b1 >
 
using Data = max31865::Data< pt >
 

Public Types

enum  Fault : uint8_t {
  RtdHighThreshold = Bit7, RtdLowThreshold = Bit6, RefinMGreater85Percentbias = Bit5, RefinMLess85PercentVbias = Bit4,
  RtdinMLess85PercentVbias = Bit3, OverUnderVoltage = Bit2
}
 
enum  FaultDetectionRead : uint8_t { FaultDetectionFinished = 0b00, AutomaticDetectionStillRunning = 0b01, ManualCycle1Running, ManualCycle2StillRunning = 0b11 }
 
enum  Rejection : uint8_t { Rejection60Hz = 0b0, Rejection50Hz = 0b1 }
 
enum  Register : uint8_t {
  ReadConfiguration = 0x00, ReadRtdMsb = 0x01, ReadRtdLsb = 0x02, ReadHighFaultThresholdMsb = 0x03,
  ReadHighFaultThresholdLsb = 0x04, ReadLowFaultThresholdMsb = 0x05, ReadLowFaultThresholdLsb = 0x06, ReadFaultStatus = 0x07,
  WriteConfiguration = 0x80, WriteHighFaultThresholdMsb = 0x83, WriteHighFaultThresholdLsb = 0x84, WriteLowFaultThresholdMsb = 0x85,
  WriteLowFaultThresholdLsb = 0x86
}
 

Public Member Functions

 Max31865 (Data &data)
 
modm::ResumableResult< void > initialize ()
 Call this function once before using the device.
 
modm::ResumableResult< void > readout ()
 Read the raw data from the sensor.
 
DatagetData ()
 Get the data object for this sensor.
 
void attachConfigurationHandler (Spi::ConfigurationHandler handler)
 

Static Public Member Functions

static constexpr uint16_t rtdfaultthresh (const uint16_t res)
 

Static Public Attributes

static constexpr Pt pt100
 Standard values for IEC 751 (PT100) with 430 Ohm reference. More...
 

Protected Member Functions

bool acquireMaster ()
 
bool releaseMaster ()
 
modm::ResumableResult< ReturnType > resumable function (...)
 
int8_t getResumableDepth () const
 
bool isResumableRunning () const
 
void stopResumable ()
 Force all resumable functions to stop running at the current nesting level.
 

Detailed Description

template<typename SpiMaster, typename Cs, max31865::Pt pt = max31865::pt100>
class modm::max31865< SpiMaster, Cs, pt >

Template Parameters
SpiMaster
Cs

Member Function Documentation

modm::ResumableResult< ReturnType > resumable modm::NestedResumable< 1 >::function (   ...)
inherited

Run the resumable function.

You need to implement this method in you subclass yourself.

Returns
>NestingError if still running, <=NestingError if it has finished.
int8_t modm::NestedResumable< 1 >::getResumableDepth ( ) const
inheritedinline
Returns
the nesting depth in the current resumable function, or -1 if called outside any resumable function
bool modm::NestedResumable< 1 >::isResumableRunning ( ) const
inheritedinline
Returns
true if a resumable function is running at the current nesting level, else false
template<typename SpiMaster , typename Cs , max31865::Pt pt = max31865::pt100>
modm::max31865< SpiMaster, Cs, pt >::Max31865 ( Data data)
Parameters
datapointer to buffer of the internal data of type Data

Member Data Documentation

template<typename SpiMaster , typename Cs , max31865::Pt pt = max31865::pt100>
constexpr Pt modm::max31865< SpiMaster, Cs, pt >::pt100
staticconstexpr
Initial value:
{
.R0 = 100.f,
.Rref = 430.f,
.alpha = 3.85055e-3f,
.a = double{3.90830e-3},
.b = double{-5.77500e-7},
.c = double{-4.18301e-12},
}

Standard values for IEC 751 (PT100) with 430 Ohm reference.


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