[pulse_counter] Fix build failure when use_pcnt is false (#14111)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
da616e0557
commit
9aa17984df
2 files changed
+12
-2
No files matched your search
@@ -8,10 +8,10 @@
|
||||
|
||||
#if defined(USE_ESP32)
|
||||
#include <soc/soc_caps.h>
|
||||
#ifdef SOC_PCNT_SUPPORTED
|
||||
#if defined(SOC_PCNT_SUPPORTED) && __has_include(<driver/pulse_cnt.h>)
|
||||
#include <driver/pulse_cnt.h>
|
||||
#define HAS_PCNT
|
||||
#endif // SOC_PCNT_SUPPORTED
|
||||
#endif // defined(SOC_PCNT_SUPPORTED) && __has_include(<driver/pulse_cnt.h>)
|
||||
#endif // USE_ESP32
|
||||
|
||||
namespace esphome {
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
sensor:
|
||||
- platform: pulse_counter
|
||||
name: Pulse Counter
|
||||
pin: 4
|
||||
use_pcnt: false
|
||||
count_mode:
|
||||
rising_edge: INCREMENT
|
||||
falling_edge: DECREMENT
|
||||
internal_filter: 13us
|
||||
update_interval: 15s
|
||||
Reference in new issue
Block a user