ESPHome
2026.11.0-dev
Loading...
Searching...
No Matches
esphome
core
gpio.h
Go to the documentation of this file.
1
#pragma once
2
#include "
esphome/core/gpio_pin.h
"
3
4
// Each platform has exactly one internal pin class, so InternalGPIOPin is an alias for
5
// it instead of an abstract base class: calls through the alias are direct and can be inlined.
6
#if defined(USE_ESP32)
7
#include "
esphome/components/esp32/gpio.h
"
8
namespace
esphome
{
9
using
InternalGPIOPin
=
esp32::ESP32InternalGPIOPin
;
10
}
11
#elif defined(USE_ESP8266)
12
#include "
esphome/components/esp8266/gpio.h
"
13
namespace
esphome
{
14
using
InternalGPIOPin
= esp8266::ESP8266GPIOPin;
15
}
16
#elif defined(USE_LIBRETINY)
17
#include "
esphome/components/libretiny/gpio_arduino.h
"
18
namespace
esphome
{
19
using
InternalGPIOPin
= libretiny::ArduinoInternalGPIOPin;
20
}
21
#elif defined(USE_RP2)
22
#include "
esphome/components/rp2/gpio.h
"
23
namespace
esphome
{
24
using
InternalGPIOPin
= rp2::RP2GPIOPin;
25
}
26
#elif defined(USE_HOST)
27
#include "
esphome/components/host/gpio.h
"
28
namespace
esphome
{
29
using
InternalGPIOPin
= host::HostGPIOPin;
30
}
31
#elif defined(USE_ZEPHYR)
32
#include "
esphome/components/zephyr/gpio.h
"
33
namespace
esphome
{
34
using
InternalGPIOPin
= zephyr::ZephyrGPIOPin;
35
}
36
#else
37
#error "gpio.h: no internal pin class for this platform"
38
#endif
39
40
namespace
esphome
{
41
static_assert
(InternalGPIOPinContract<InternalGPIOPin>,
42
"The platform's internal pin class is missing part of the InternalGPIOPin surface "
43
"(esphome/core/gpio_pin.h)"
);
44
}
// namespace esphome
esphome::esp32::ESP32InternalGPIOPin
Definition
gpio.h:14
gpio.h
gpio.h
gpio.h
gpio.h
gpio.h
gpio_arduino.h
gpio_pin.h
esphome
Definition
a01nyub.cpp:7
esphome::InternalGPIOPin
esp32::ESP32InternalGPIOPin InternalGPIOPin
Definition
gpio.h:9
Generated by
1.12.0