ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
esphome::fusb302b::PackedContract Struct Reference

A contract packed into one word so it can be shared between tasks as an atomic. More...

#include <pd.h>

Public Member Functions

bool is_set () const
 
float voltage () const
 
float current () const
 

Static Public Member Functions

static PackedContract from (const PdContract &contract)
 

Data Fields

uint32_t value {0}
 

Detailed Description

A contract packed into one word so it can be shared between tasks as an atomic.

0 means there is no contract (nothing attached).

Definition at line 80 of file pd.h.

Member Function Documentation

◆ current()

float esphome::fusb302b::PackedContract::current ( ) const
inline

Definition at line 88 of file pd.h.

◆ from()

static PackedContract esphome::fusb302b::PackedContract::from ( const PdContract & contract)
inlinestatic

Definition at line 83 of file pd.h.

◆ is_set()

bool esphome::fusb302b::PackedContract::is_set ( ) const
inline

Definition at line 86 of file pd.h.

◆ voltage()

float esphome::fusb302b::PackedContract::voltage ( ) const
inline

Definition at line 87 of file pd.h.

Field Documentation

◆ value

uint32_t esphome::fusb302b::PackedContract::value {0}

Definition at line 81 of file pd.h.


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