5 namespace pulse_width {
7 static const char *
const TAG =
"pulse_width";
11 const uint32_t now =
micros();
20 LOG_SENSOR(
"",
"Pulse Width",
this)
21 LOG_UPDATE_INTERVAL(
this)
22 LOG_PIN(
" Pin: ", this->
pin_);
25 float width = this->store_.get_pulse_width_s();
26 ESP_LOGCONFIG(TAG,
"'%s' - Got pulse width %.3f s", this->name_.c_str(), width);
27 this->publish_state(width);
volatile uint32_t last_rise_
volatile uint32_t last_width_
uint32_t IRAM_ATTR HOT micros()
Store data in a class that doesn't use multiple-inheritance (vtables in flash)
Implementation of SPI Controller mode.
void dump_config() override
static void gpio_intr(PulseWidthSensorStore *arg)