ESPHome
2024.10.2
esphome
esphome
components
gpio
binary_sensor
gpio_binary_sensor.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/core/component.h
"
4
#include "
esphome/core/hal.h
"
5
#include "
esphome/components/binary_sensor/binary_sensor.h
"
6
7
namespace
esphome
{
8
namespace
gpio {
9
10
class
GPIOBinarySensor
:
public
binary_sensor::BinarySensor
,
public
Component
{
11
public
:
12
void
set_pin
(
GPIOPin
*pin) {
pin_
= pin; }
13
// ========== INTERNAL METHODS ==========
14
// (In most use cases you won't need these)
16
void
setup
()
override
;
17
void
dump_config
()
override
;
19
float
get_setup_priority
()
const override
;
21
void
loop
()
override
;
22
23
protected
:
24
GPIOPin
*
pin_
;
25
};
26
27
}
// namespace gpio
28
}
// namespace esphome
hal.h
esphome::Component
Definition:
component.h:68
esphome::gpio::GPIOBinarySensor
Definition:
gpio_binary_sensor.h:10
esphome::gpio::GPIOBinarySensor::get_setup_priority
float get_setup_priority() const override
Hardware priority.
Definition:
gpio_binary_sensor.cpp:21
esphome::gpio::GPIOBinarySensor::set_pin
void set_pin(GPIOPin *pin)
Definition:
gpio_binary_sensor.h:12
esphome::gpio::GPIOBinarySensor::dump_config
void dump_config() override
Definition:
gpio_binary_sensor.cpp:14
binary_sensor.h
esphome::gpio::GPIOBinarySensor::loop
void loop() override
Check sensor.
Definition:
gpio_binary_sensor.cpp:19
esphome::gpio::GPIOBinarySensor::setup
void setup() override
Setup pin.
Definition:
gpio_binary_sensor.cpp:9
esphome
Implementation of SPI Controller mode.
Definition:
a01nyub.cpp:7
component.h
esphome::binary_sensor::BinarySensor
Base class for all binary_sensor-type classes.
Definition:
binary_sensor.h:37
esphome::gpio::GPIOBinarySensor::pin_
GPIOPin * pin_
Definition:
gpio_binary_sensor.h:24
esphome::GPIOPin
Definition:
gpio.h:50
Generated by
1.8.13