21 #ifndef COSA_HCSR04_HH 22 #define COSA_HCSR04_HH 91 __attribute__((always_inline))
112 static const uint16_t TIMEOUT = 0xffffU;
115 static const uint16_t COUNT_PER_DM = (555 *
I_CPU) / 16;
133 virtual void on_event(uint8_t type, uint16_t value);
int32_t expire_after() const
virtual void on_change(uint16_t distance)
bool read(uint16_t &distance)
uint16_t distance() const
HCSR04(Job::Scheduler *scheduler, Board::DigitalPin trigger, Board::DigitalPin echo)
void schedule(uint16_t ms)