ESPHome 2025.12.0-dev
Loading...
Searching...
No Matches
esphome::light::ColorModeBitPolicy Struct Reference

Bit mapping policy for ColorMode Uses lookup table for non-contiguous enum values. More...

#include <color_mode.h>

Public Types

using mask_t = uint16_t
 

Static Public Member Functions

static constexpr unsigned to_bit (ColorMode mode)
 
static constexpr ColorMode from_bit (unsigned bit)
 

Static Public Attributes

static constexpr int MAX_BITS = sizeof(COLOR_MODE_LOOKUP) / sizeof(COLOR_MODE_LOOKUP[0])
 

Detailed Description

Bit mapping policy for ColorMode Uses lookup table for non-contiguous enum values.

Definition at line 128 of file color_mode.h.

Member Typedef Documentation

◆ mask_t

Definition at line 129 of file color_mode.h.

Member Function Documentation

◆ from_bit()

static constexpr ColorMode esphome::light::ColorModeBitPolicy::from_bit ( unsigned bit)
inlinestaticconstexpr

Definition at line 142 of file color_mode.h.

◆ to_bit()

static constexpr unsigned esphome::light::ColorModeBitPolicy::to_bit ( ColorMode mode)
inlinestaticconstexpr

Definition at line 132 of file color_mode.h.

Field Documentation

◆ MAX_BITS

int esphome::light::ColorModeBitPolicy::MAX_BITS = sizeof(COLOR_MODE_LOOKUP) / sizeof(COLOR_MODE_LOOKUP[0])
staticconstexpr

Definition at line 130 of file color_mode.h.


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