ESPHome  2021.11.4
Data Structures | Enumerations | Functions
esphome::gpio Namespace Reference

Data Structures

class  FlagsHelper
 
class  GPIOBinaryOutput
 
class  GPIOBinarySensor
 
class  GPIOSwitch
 

Enumerations

enum  GPIOSwitchRestoreMode {
  GPIO_SWITCH_RESTORE_DEFAULT_OFF, GPIO_SWITCH_RESTORE_DEFAULT_ON, GPIO_SWITCH_ALWAYS_OFF, GPIO_SWITCH_ALWAYS_ON,
  GPIO_SWITCH_RESTORE_INVERTED_DEFAULT_OFF, GPIO_SWITCH_RESTORE_INVERTED_DEFAULT_ON
}
 
enum  Flags : uint8_t {
  FLAG_NONE = 0x00, FLAG_INPUT = 0x01, FLAG_OUTPUT = 0x02, FLAG_OPEN_DRAIN = 0x04,
  FLAG_PULLUP = 0x08, FLAG_PULLDOWN = 0x10
}
 
enum  InterruptType : uint8_t {
  INTERRUPT_RISING_EDGE = 1, INTERRUPT_FALLING_EDGE = 2, INTERRUPT_ANY_EDGE = 3, INTERRUPT_LOW_LEVEL = 4,
  INTERRUPT_HIGH_LEVEL = 5
}
 

Functions

constexpr FlagsHelper operator & (Flags lhs, Flags rhs)
 
constexpr FlagsHelper operator| (Flags lhs, Flags rhs)
 

Enumeration Type Documentation

◆ Flags

enum esphome::gpio::Flags : uint8_t
Enumerator
FLAG_NONE 
FLAG_INPUT 
FLAG_OUTPUT 
FLAG_OPEN_DRAIN 
FLAG_PULLUP 
FLAG_PULLDOWN 

Definition at line 15 of file gpio.h.

◆ GPIOSwitchRestoreMode

Enumerator
GPIO_SWITCH_RESTORE_DEFAULT_OFF 
GPIO_SWITCH_RESTORE_DEFAULT_ON 
GPIO_SWITCH_ALWAYS_OFF 
GPIO_SWITCH_ALWAYS_ON 
GPIO_SWITCH_RESTORE_INVERTED_DEFAULT_OFF 
GPIO_SWITCH_RESTORE_INVERTED_DEFAULT_ON 

Definition at line 10 of file gpio_switch.h.

◆ InterruptType

Enumerator
INTERRUPT_RISING_EDGE 
INTERRUPT_FALLING_EDGE 
INTERRUPT_ANY_EDGE 
INTERRUPT_LOW_LEVEL 
INTERRUPT_HIGH_LEVEL 

Definition at line 40 of file gpio.h.

Function Documentation

◆ operator &()

constexpr FlagsHelper esphome::gpio::operator& ( Flags  lhs,
Flags  rhs 
)

Definition at line 33 of file gpio.h.

◆ operator|()

constexpr FlagsHelper esphome::gpio::operator| ( Flags  lhs,
Flags  rhs 
)

Definition at line 36 of file gpio.h.