mirror of
https://github.com/esphome/esphome.git
synced 2025-09-21 12:42:21 +01:00
[gpio] Fix unused function warnings when compiling with log level below DEBUG (#10779)
This commit is contained in:
committed by
Jesse Hills
parent
a06cd84974
commit
a5a21f47d1
@@ -6,6 +6,7 @@ namespace gpio {
|
|||||||
|
|
||||||
static const char *const TAG = "gpio.binary_sensor";
|
static const char *const TAG = "gpio.binary_sensor";
|
||||||
|
|
||||||
|
#if ESPHOME_LOG_LEVEL >= ESPHOME_LOG_LEVEL_DEBUG
|
||||||
static const LogString *interrupt_type_to_string(gpio::InterruptType type) {
|
static const LogString *interrupt_type_to_string(gpio::InterruptType type) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case gpio::INTERRUPT_RISING_EDGE:
|
case gpio::INTERRUPT_RISING_EDGE:
|
||||||
@@ -22,6 +23,7 @@ static const LogString *interrupt_type_to_string(gpio::InterruptType type) {
|
|||||||
static const LogString *gpio_mode_to_string(bool use_interrupt) {
|
static const LogString *gpio_mode_to_string(bool use_interrupt) {
|
||||||
return use_interrupt ? LOG_STR("interrupt") : LOG_STR("polling");
|
return use_interrupt ? LOG_STR("interrupt") : LOG_STR("polling");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void IRAM_ATTR GPIOBinarySensorStore::gpio_intr(GPIOBinarySensorStore *arg) {
|
void IRAM_ATTR GPIOBinarySensorStore::gpio_intr(GPIOBinarySensorStore *arg) {
|
||||||
bool new_state = arg->isr_pin_.digital_read();
|
bool new_state = arg->isr_pin_.digital_read();
|
||||||
|
Reference in New Issue
Block a user