MAX22200 Driver 0.1.0
API reference
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
max22200::Faults Struct Reference

The FAULT register: one byte per fault type, bit n for channel n (Table 12). Also used to say which flags ClearFaults() clears. More...

#include <max22200_types.hpp>

Public Member Functions

constexpr bool Any () const noexcept
 
constexpr uint8_t Channels () const noexcept
 
constexpr Faults Or (const Faults &other) const noexcept
 
constexpr Faults And (const Faults &mask) const noexcept
 

Static Public Member Functions

static constexpr Faults All () noexcept
 

Public Attributes

uint8_t overcurrent {0}
 OCP[7:0]: the channel was switched off (turn it off, then on).
 
uint8_t hit_not_reached {0}
 HHF[7:0]: IHIT not reached by the end of tHIT.
 
uint8_t open_load {0}
 OLF[7:0].
 
uint8_t plunger {0}
 DPM[7:0]: no valid current dip during HIT.
 

Friends

constexpr bool operator== (const Faults &lhs, const Faults &rhs) noexcept=default
 

Detailed Description

The FAULT register: one byte per fault type, bit n for channel n (Table 12). Also used to say which flags ClearFaults() clears.

Member Function Documentation

◆ All()

static constexpr Faults max22200::Faults::All ( )
inlinestaticconstexprnoexcept
Returns
Every flag of every channel.

◆ And()

constexpr Faults max22200::Faults::And ( const Faults &  mask) const
inlineconstexprnoexcept
Parameters
maskThe flags to keep.
Returns
Every flag set both here and in mask.

◆ Any()

constexpr bool max22200::Faults::Any ( ) const
inlineconstexprnoexcept
Returns
true when any flag is set.

◆ Channels()

constexpr uint8_t max22200::Faults::Channels ( ) const
inlineconstexprnoexcept
Returns
The channels with any flag, bit n for channel n.

◆ Or()

constexpr Faults max22200::Faults::Or ( const Faults &  other) const
inlineconstexprnoexcept
Parameters
otherThe flags to add.
Returns
Every flag set here or in other.

Friends And Related Symbol Documentation

◆ operator==

constexpr bool operator== ( const Faults &  lhs,
const Faults &  rhs 
)
friend
Parameters
lhsThe first value.
rhsThe value to compare it with.
Returns
true when every field of lhs equals rhs's.

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