24#include <fastarduino/boards/board.h>
46#define REGISTER_HCSR04_INT_ISR(TIMER, INT_NUM, TRIGGER, ECHO) \
47 ISR(CAT3(INT, INT_NUM, _vect)) \
49 devices::sonar::isr_handler::sonar_int<INT_NUM, TIMER, TRIGGER, ECHO>(); \
70#define REGISTER_HCSR04_PCI_ISR(TIMER, PCI_NUM, TRIGGER, ECHO, ...) \
71 ISR(CAT3(PCINT, PCI_NUM, _vect)) \
73 devices::sonar::isr_handler::sonar_pci<PCI_NUM, TIMER, TRIGGER, ECHO, ##__VA_ARGS__>(); \
86#define SONAR_PINS(TRIGGER, ECHO) devices::sonar::isr_handler::TriggerEcho<TRIGGER, ECHO>
107#define REGISTER_DISTINCT_HCSR04_PCI_ISR(TIMER, PCI_NUM, SONAR_PINS1, ...) \
108 ISR(CAT3(PCINT, PCI_NUM, _vect)) \
110 devices::sonar::isr_handler::sonar_distinct_pci<PCI_NUM, TIMER, SONAR_PINS1, ##__VA_ARGS__>(); \
133#define REGISTER_HCSR04_INT_ISR_METHOD(TIMER, INT_NUM, TRIGGER, ECHO, HANDLER, CALLBACK) \
134 ISR(CAT3(INT, INT_NUM, _vect)) \
136 devices::sonar::isr_handler::sonar_int_method<INT_NUM, TIMER, TRIGGER, ECHO, HANDLER, CALLBACK>(); \
157#define REGISTER_HCSR04_INT_ISR_FUNCTION(TIMER, INT_NUM, TRIGGER, ECHO, CALLBACK) \
158 ISR(CAT3(INT, INT_NUM, _vect)) \
160 devices::sonar::isr_handler::sonar_int_function<INT_NUM, TIMER, TRIGGER, ECHO, CALLBACK>(); \
185#define REGISTER_HCSR04_PCI_ISR_METHOD(TIMER, PCI_NUM, TRIGGER, ECHO, HANDLER, CALLBACK) \
186 ISR(CAT3(PCINT, PCI_NUM, _vect)) \
188 devices::sonar::isr_handler::sonar_pci_method<PCI_NUM, TIMER, TRIGGER, ECHO, HANDLER, CALLBACK>(); \
210#define REGISTER_HCSR04_PCI_ISR_FUNCTION(TIMER, PCI_NUM, TRIGGER, ECHO, CALLBACK) \
211 ISR(CAT3(PCINT, PCI_NUM, _vect)) \
213 devices::sonar::isr_handler::sonar_pci_function<PCI_NUM, TIMER, TRIGGER, ECHO, CALLBACK>(); \
232#define REGISTER_HCSR04_RTT_TIMEOUT(TIMER_NUM, SONAR, ...) \
233 ISR(CAT3(TIMER, TIMER_NUM, _COMPA_vect)) \
235 devices::sonar::isr_handler::sonar_rtt_change<TIMER_NUM, SONAR, ##__VA_ARGS__>(); \
257#define REGISTER_HCSR04_RTT_TIMEOUT_METHOD(TIMER_NUM, HANDLER, CALLBACK, SONAR, ...) \
258 ISR(CAT3(TIMER, TIMER_NUM, _COMPA_vect)) \
260 if (devices::sonar::isr_handler::sonar_rtt_change<TIMER_NUM, SONAR, ##__VA_ARGS__>()) \
261 interrupt::CallbackHandler<void (HANDLER::*)(), CALLBACK>::call(); \
282#define REGISTER_HCSR04_RTT_TIMEOUT_FUNCTION(TIMER_NUM, CALLBACK, SONAR, ...) \
283 ISR(CAT3(TIMER, TIMER_NUM, _COMPA_vect)) \
285 if (devices::sonar::isr_handler::sonar_rtt_change<TIMER_NUM, SONAR, ##__VA_ARGS__>()) \
286 interrupt::CallbackHandler<void (*)(), CALLBACK>::call(); \
313#define REGISTER_MULTI_HCSR04_PCI_ISR_METHOD(TIMER, PCI_NUM, TRIGGER, ECHO_PORT, ECHO_MASK, HANDLER, CALLBACK) \
314 ISR(CAT3(PCINT, PCI_NUM, _vect)) \
316 using ISRHANDLER = devices::sonar::isr_handler; \
317 ISRHANDLER::multi_sonar_pci_method<PCI_NUM, TIMER, TRIGGER, ECHO_PORT, ECHO_MASK, HANDLER, CALLBACK>();\
342#define REGISTER_MULTI_HCSR04_PCI_ISR_FUNCTION(TIMER, PCI_NUM, TRIGGER, ECHO_PORT, ECHO_MASK, CALLBACK) \
343 ISR(CAT3(PCINT, PCI_NUM, _vect)) \
345 using ISRHANDLER = devices::sonar::isr_handler; \
346 ISRHANDLER::multi_sonar_pci_function<PCI_NUM, TIMER, TRIGGER, ECHO_PORT, ECHO_MASK, CALLBACK>();\
367#define REGISTER_MULTI_HCSR04_RTT_TIMEOUT_METHOD(TIMER_NUM, SONAR, HANDLER, CALLBACK) \
368 ISR(CAT3(TIMER, TIMER_NUM, _COMPA_vect)) \
370 using EVENT = typename SONAR::EVENT; \
371 EVENT event = devices::sonar::isr_handler::multi_sonar_rtt_change<TIMER_NUM, SONAR, EVENT>(); \
372 if (event.timeout()) interrupt::CallbackHandler<void (HANDLER::*)(const EVENT&), CALLBACK>::call(event); \
391#define REGISTER_MULTI_HCSR04_RTT_TIMEOUT_FUNCTION(TIMER_NUM, SONAR, CALLBACK) \
392 ISR(CAT3(TIMER, TIMER_NUM, _COMPA_vect)) \
394 using EVENT = typename SONAR::EVENT; \
395 EVENT event = devices::sonar::isr_handler::multi_sonar_rtt_change<TIMER_NUM, SONAR, EVENT>(); \
396 if (event.timeout()) interrupt::CallbackHandler<void (*)(const EVENT&), CALLBACK>::call(event); \
423#define REGISTER_MULTI_HCSR04_RTT_TIMEOUT_TRIGGER_METHOD(TIMER_NUM, SONAR, HANDLER, CB_TIMEOUT, CB_RTT) \
424 ISR(CAT3(TIMER, TIMER_NUM, _COMPA_vect)) \
426 using EVENT = typename SONAR::EVENT; \
427 EVENT event = devices::sonar::isr_handler::multi_sonar_rtt_change<TIMER_NUM, SONAR, EVENT>(); \
428 if (event.timeout()) \
429 interrupt::CallbackHandler<void (HANDLER::*)(const EVENT&), CB_TIMEOUT>::call(event); \
430 interrupt::CallbackHandler<void (HANDLER::*)(), CB_RTT>::call(); \
454#define REGISTER_MULTI_HCSR04_RTT_TIMEOUT_TRIGGER_FUNCTION(TIMER_NUM, SONAR, CB_TIMEOUT, CB_RTT) \
455 ISR(CAT3(TIMER, TIMER_NUM, _COMPA_vect)) \
457 using EVENT = typename SONAR::EVENT; \
458 EVENT event = devices::sonar::isr_handler::multi_sonar_rtt_change<TIMER_NUM, SONAR, EVENT>(); \
459 if (event.timeout()) \
460 interrupt::CallbackHandler<void (*)(const EVENT&), CB_TIMEOUT>::call(event); \
461 interrupt::CallbackHandler<void (*)(), CB_RTT>::call(); \
476#define DECL_SONAR_ISR_HANDLERS_FRIEND \
477 friend struct devices::sonar::isr_handler; \
478 DECL_INT_ISR_FRIENDS \
479 DECL_PCINT_ISR_FRIENDS \
480 DECL_TIMER_COMP_FRIENDS
616 return status_ == READY;
633 if (status_ == READY)
650 uint16_t async_echo_us(uint16_t timeout_ms)
652 uint32_t now = rtt_.
millis();
655 while (status_ != READY)
661 echo_start_ = echo_end_ = RAW_TIME::EMPTY_TIME;
668 template<board::DigitalPin ECHO>
671 uint32_t now = rtt_.
millis();
673 while (!echo.value())
674 if (rtt_.
millis() >= now)
return 0;
677 status_ = ECHO_STARTED;
682 if (rtt_.
millis() >= now)
return 0;
691 void trigger_sent(uint16_t timeout_ms)
696 timeout_time_ms_ = rtt_.
millis_() + timeout_ms;
700 bool pulse_edge(
bool rising)
702 if (rising && (status_ == TRIGGERED))
704 status_ = ECHO_STARTED;
708 if ((!rising) && (status_ == ECHO_STARTED))
717 bool rtt_time_changed()
719 if ((status_ != READY) && (rtt_.
millis_() >= timeout_time_ms_))
722 echo_start_ = echo_end_ = RAW_TIME::EMPTY_TIME;
730 uint16_t echo_time_()
const
732 return uint16_t((echo_end_.as_real_time() - echo_start_.as_real_time()).total_micros());
737 static constexpr const uint8_t UNKNOWN = 0x00;
738 static constexpr const uint8_t TRIGGERED = 0x10;
739 static constexpr const uint8_t ECHO_STARTED = 0x11;
740 static constexpr const uint8_t READY = 0x20;
742 volatile uint8_t status_ =
UNKNOWN;
743 uint32_t timeout_time_ms_ = 0UL;
745 RAW_TIME echo_start_ = RAW_TIME::EMPTY_TIME;
746 RAW_TIME echo_end_ = RAW_TIME::EMPTY_TIME;
770 using ECHO_PIN_TRAIT = board_traits::DigitalPin_trait<ECHO>;
771 using ECHO_PORT_TRAIT = board_traits::Port_trait<ECHO_PIN_TRAIT::PORT>;
773 "SONAR_TYPE == ASYNC_INT but ECHO is not an INT pin");
775 "SONAR_TYPE == ASYNC_PCINT but ECHO is not an PCI pin");
852 this->trigger_sent(timeout_ms);
853 if (trigger) this->trigger();
872 return this->async_echo_us(timeout_ms);
874 return this->
template blocking_echo_us<ECHO>(echo_, timeout_ms);
881 "on_pin_change() must be called only with SonarType::ASYNC_INT or ASYNC_PCINT");
882 return this->pulse_edge(echo_.value());
887 return this->rtt_time_changed();
898 static constexpr const uint16_t TRIGGER_PULSE_US = 10;
904 friend struct isr_handler;
921 template<board::Timer NTIMER_, board::DigitalPin TRIGGER_, board::DigitalPin ECHO_>
937 template<board::Timer NTIMER_, board::DigitalPin TRIGGER_, board::ExternalInterruptPin ECHO_>
953 template<board::Timer NTIMER_, board::DigitalPin TRIGGER_, board::InterruptPin ECHO_>
1066 bool timeout_ =
false;
1067 uint8_t started_ = 0;
1069 RAW_TIME time_ = RAW_TIME::EMPTY_TIME;
1071 template<board::Timer, board::DigitalPin, board::Port, u
int8_t>
friend class MultiHCSR04;
1106 template<board::Timer NTIMER_, board::DigitalPin TRIGGER_, board::Port ECHO_PORT_, u
int8_t ECHO_MASK_>
1118 using PTRAIT = board_traits::Port_trait<ECHO_PORT>;
1119 static_assert(PTRAIT::PCINT != board_traits::PCI_NONE,
"ECHO_PORT_ must support PCINT");
1120 static_assert((PTRAIT::DPIN_MASK &
ECHO_MASK) ==
ECHO_MASK,
"ECHO_MASK_ must contain available PORT pins");
1181 timeout_time_ms_ = rtt_.
millis() + timeout_ms;
1246 EVENT on_pin_change()
1248 if (!active_)
return EVENT{};
1250 uint8_t pins = echo_.
get_PIN();
1255 started_ |= started;
1257 if (ready_ ==
ECHO_MASK) active_ =
false;
1261 EVENT on_rtt_change()
1263 if (active_ && (rtt_.
millis_() >= timeout_time_ms_))
1271 static constexpr const uint16_t TRIGGER_PULSE_US = 10;
1274 volatile uint8_t started_ = 0;
1275 volatile uint8_t ready_ = 0;
1276 volatile bool active_ =
false;
1277 uint32_t timeout_time_ms_ = 0UL;
1282 friend struct isr_handler;
1289 template<u
int8_t INT_NUM_, board::Timer TIMER_, board::DigitalPin TRIGGER_, board::ExternalInterruptPin ECHO_>
1290 static bool sonar_int()
1292 timer::isr_handler::check_timer<TIMER_>();
1293 static_assert(board_traits::ExternalInterruptPin_trait<ECHO_>::INT == INT_NUM_,
1294 "ECHO INT number must match INT_NUM");
1295 using SONAR = ASYNC_INT_HCSR04<TIMER_, TRIGGER_, ECHO_>;
1296 return interrupt::HandlerHolder<SONAR>::handler()->on_pin_change();
1300 typename HANDLER_, void (HANDLER_::*CALLBACK_)()>
1301 static void sonar_int_method()
1303 if (sonar_int<INT_NUM_, TIMER_, TRIGGER_, ECHO_>())
1304 interrupt::CallbackHandler<
void (HANDLER_::*)(), CALLBACK_>::call();
1308 void (*CALLBACK_)()>
1309 static void sonar_int_function()
1311 if (sonar_int<INT_NUM_, TIMER_, TRIGGER_, ECHO_>()) CALLBACK_();
1314 template<u
int8_t PCI_NUM_, board::Timer TIMER_, board::DigitalPin TRIGGER_>
static bool sonar_pci()
1321 static bool sonar_pci()
1323 timer::isr_handler::check_timer<TIMER_>();
1325 interrupt::isr_handler_pci::check_pci_pins<PCI_NUM_, ECHO1_>();
1326 using SONAR = ASYNC_PCINT_HCSR04<TIMER_, TRIGGER_, ECHO1_>;
1327 bool result = interrupt::HandlerHolder<SONAR>::handler()->on_pin_change();
1329 return result || sonar_pci<PCI_NUM_, TIMER_, TRIGGER_, ECHOS_...>();
1332 template<
bool DUMMY_>
static bool sonar_rtt_change_helper()
1337 template<
bool DUMMY_,
typename SONAR1_,
typename... SONARS_>
static bool sonar_rtt_change_helper()
1339 bool result = interrupt::HandlerHolder<SONAR1_>::handler()->on_rtt_change();
1341 return result || sonar_rtt_change_helper<DUMMY_, SONARS_...>();
1344 template<uint8_t TIMER_NUM_,
typename... SONARS_>
static bool sonar_rtt_change()
1347 timer::isr_handler_rtt::rtt<TIMER_NUM_>();
1349 return sonar_rtt_change_helper<
false, SONARS_...>();
1353 typename HANDLER_, void (HANDLER_::*CALLBACK_)()>
1354 static void sonar_pci_method()
1356 if (sonar_pci<PCI_NUM_, TIMER_, TRIGGER_, ECHO_>())
1357 interrupt::CallbackHandler<
void (HANDLER_::*)(), CALLBACK_>::call();
1361 void (*CALLBACK_)()>
1362 static void sonar_pci_function()
1364 if (sonar_pci<PCI_NUM_, TIMER_, TRIGGER_, ECHO_>()) CALLBACK_();
1367 template<board::DigitalPin TRIGGER_, board::InterruptPin ECHO_>
struct TriggerEcho
1373 template<u
int8_t PCI_NUM_, board::Timer TIMER_>
static bool sonar_distinct_pci()
1378 template<u
int8_t PCI_NUM_, board::Timer TIMER_, board::DigitalPin TRIGGER_, board::InterruptPin ECHO_>
1379 static bool sonar_distinct_pci_one()
1381 timer::isr_handler::check_timer<TIMER_>();
1383 interrupt::isr_handler_pci::check_pci_pins<PCI_NUM_, ECHO_>();
1384 using SONAR = ASYNC_PCINT_HCSR04<TIMER_, TRIGGER_, ECHO_>;
1385 return interrupt::HandlerHolder<SONAR>::handler()->on_pin_change();
1388 template<uint8_t PCI_NUM_,
board::Timer TIMER_,
typename TRIGGER_ECHO1_,
typename ...TRIGGER_ECHOS_>
1389 static bool sonar_distinct_pci()
1391 bool result = sonar_distinct_pci_one<PCI_NUM_, TIMER_, TRIGGER_ECHO1_::TRIGGER, TRIGGER_ECHO1_::ECHO>();
1393 return result || sonar_distinct_pci<PCI_NUM_, TIMER_, TRIGGER_ECHOS_...>();
1397 uint8_t ECHO_MASK_,
typename HANDLER_, void (HANDLER_::*CALLBACK_)(
const SonarEvent<TIMER_>&)>
1398 static void multi_sonar_pci_method()
1400 timer::isr_handler::check_timer<TIMER_>();
1401 using PTRAIT = board_traits::Port_trait<ECHO_PORT_>;
1402 static_assert(PTRAIT::PCINT == PCI_NUM_,
"ECHO_PORT must match PCI_NUM");
1403 static_assert((PTRAIT::DPIN_MASK & ECHO_MASK_) == ECHO_MASK_,
"ECHO_MASK must contain available PORT pins");
1404 using SONAR = MultiHCSR04<TIMER_, TRIGGER_, ECHO_PORT_, ECHO_MASK_>;
1405 SonarEvent<TIMER_> event = interrupt::HandlerHolder<SONAR>::handler()->on_pin_change();
1406 if ((event.ready() != 0) || (event.started() != 0))
1407 interrupt::CallbackHandler<void (HANDLER_::*)(
const SonarEvent<TIMER_>&), CALLBACK_>::call(event);
1411 uint8_t ECHO_MASK_, void (*CALLBACK_)(
const SonarEvent<TIMER_>&)>
1412 static void multi_sonar_pci_function()
1414 timer::isr_handler::check_timer<TIMER_>();
1415 using PTRAIT = board_traits::Port_trait<ECHO_PORT_>;
1416 static_assert(PTRAIT::PCINT == PCI_NUM_,
"ECHO_PORT must match PCI_NUM");
1417 static_assert((PTRAIT::DPIN_MASK & ECHO_MASK_) == ECHO_MASK_,
"ECHO_MASK must contain available PORT pins");
1418 using SONAR = MultiHCSR04<TIMER_, TRIGGER_, ECHO_PORT_, ECHO_MASK_>;
1419 SonarEvent<TIMER_> event = interrupt::HandlerHolder<SONAR>::handler()->on_pin_change();
1420 if (event.ready() || event.started()) CALLBACK_(event);
1423 template<u
int8_t TIMER_NUM_,
typename SONAR_,
typename EVENT_>
static EVENT_ multi_sonar_rtt_change()
1426 timer::isr_handler_rtt::rtt<TIMER_NUM_>();
1427 return interrupt::HandlerHolder<SONAR_>::handler()->on_rtt_change();
An abstract base class for some sonar classes defined as part of this API.
bool ready() const
Indicate if an echo pulse measure is ready to read.
timer::RTT< NTIMER_ > RTT
The type of timer::RTT used by this sonar instance.
uint16_t latest_echo_us() const
Get the latest measured echo pulse duration.
uint16_t echo_us(uint16_t timeout_ms)
Send a trigger pulse on this sonar and wait until an echo pulse is received, or timeout_ms has elapse...
static constexpr const SonarType SONAR_TYPE
The mode used by this class to calculate the echo pin pulse duration.
void async_echo(uint16_t timeout_ms, bool trigger=true)
Send a trigger pulse on this sonar and return immediately, without waiting for the echo pulse.
HCSR04(const RTT &rtt)
Construct a new a sonar sensor handler.
uint16_t await_echo_us(uint16_t timeout_ms)
Wait until an echo pulse is received, or timeout_ms has elapsed.
static constexpr const board::DigitalPin TRIGGER
The board::DigitalPin connected to the sensor trigger pin.
static constexpr const uint16_t MAX_RANGE_M
The approximate maximum range, in meters, that this sonar sensor supports.
static constexpr const board::DigitalPin ECHO
The board::DigitalPin connected to the sensor echo pin.
static constexpr const uint16_t DEFAULT_TIMEOUT_MS
The default timeout duration, in milliseconds, to use if you want to cover the maximum range of the s...
This template class supports up to 8 HC-SR04 sonars (or equivalent sensors), with their trigger pins ...
void trigger(uint16_t timeout_ms)
Start ranging on all sonars connected to this MultiHCSR04.
uint8_t ready() const
Tell, for which of the connected sonars, the latest ranging, started by trigger(),...
SonarEvent< NTIMER_ > EVENT
The exact SonarEvent type produced by this MultiHCSR04 instance.
MultiHCSR04(RTT &rtt)
Construct a new a multi-sonar sensors handler.
static constexpr const uint16_t DEFAULT_TIMEOUT_MS
The default timeout duration, in milliseconds, to use if you want to cover the maximum range of the s...
static constexpr const uint8_t ECHO_MASK
The mask determining which pins of ECHO_PORT are actually connected to a real sonar echo pin.
static constexpr const board::Port ECHO_PORT
The MCU port to which all echo pins of sonars handled by this class are connected.
static constexpr const uint16_t MAX_RANGE_M
The approximate maximum range, in meters, that this sonar sensor supports.
bool all_ready() const
Tell if the latest ranging, started by trigger(), is finished for all connected sonars,...
timer::RTT< NTIMER_ > RTT
The type of timer::RTT used by this MultiHCSR04 instance.
void set_ready()
Force readiness of all connected sensors, ie the end of current ranging.
static constexpr const board::DigitalPin TRIGGER
The board::DigitalPin connected to the sensors trigger pins.
bool active() const
Tell if a ranging is under way on any sonar managed by this MultiHCSR04 instance.
API that manipulates a part of a digital IO port.
uint8_t get_PIN() INLINE
Get the current 8-bit value of PIN register for this port, masked according to the bit mask provided ...
API to handle a real-time timer.
RAW_TIME raw_time() const
Elapsed time, in raw representation, since this timer has started.
uint32_t millis() const
Elapsed time, in milliseconds, since this timer has started.
uint32_t millis_() const
Elapsed time, in milliseconds, since this timer has started.
RTTRawTime< TYPE > RAW_TIME
The adequate RTTRawTime type for this RTT.
RAW_TIME raw_time_() const
Elapsed time, in raw representation, since this timer has started.
General Purpose (digital) Input Output API.
General API for handling External Interrupt pins.
static constexpr uint8_t COMPL(uint8_t value)
Return the uint8_t 2-complement of a byte.
Port
Defines all available ports of the target MCU.
DigitalPin
Defines all available digital input/output pins of the target MCU.
InterruptPin
Defines all digital output pins of target MCU, usable as pin change interrupt (PCI) pins.
Timer
Defines all timers available for target MCU.
ExternalInterruptPin
Defines all digital output pins of target MCU, usable as direct external interrupt pins.
Defines the API for sonar support.
static constexpr const uint32_t SPEED_OF_SOUND
The approximate speed of sound (and ultrasonic) waves, in the air, expressed in meters per second.
SonarType
This enum defines the different modes, supported by HCSR04, to calculate the echo pin pulse duration.
@ ASYNC_PCINT
In this mode, the echo pin is a board::InterruptPin and the HCSR04 will use interrupts to calculate t...
@ BLOCKING
In this mode, the HCSR04 will block until the echo pulse is received.
@ ASYNC_INT
In this mode, the echo pin is a board::ExternalInterruptPin and the HCSR04 will use interrupts to cal...
static constexpr uint16_t echo_us_to_distance_mm(uint16_t echo_us)
This method converts the echo duration, in microseconds, to the distance between the sensor and the r...
static constexpr uint16_t distance_mm_to_echo_us(uint16_t distance_mm)
This method converts the disatnce, in millimeters, between the sensor and a reflecting object,...
Defines all API for all external devices supported by FastArduino.
typename FastPinType< DPIN_ >::TYPE FAST_PIN
Useful alias type to the FastPin type matching a given board::DigitalPin.
@ OUTPUT
Digital pin is configured as output.
@ INPUT
Digital pin is configured as high-impedance (open drain) input.
void register_handler(Handler &handler)
Register a class instance containing methods that shall be called back by an ISR.
Defines simple API to handle time and delays.
void delay_us(uint16_t us) INLINE
Delay program execution for the given amount of microseconds.
General API for handling Pin Change Interrupts.
This type holds information about events occurring within MultiHCSR04 handler.
typename RTT::RAW_TIME RAW_TIME
The timer::RTTRawTime type used by the MultiHCSR04 producing this SonarEvent.
bool timeout() const
Indicate if this event was produced by a timeout while waiting for echo pulses.
uint8_t started() const
Indicate if this event was produced due to an echo pulse leading edge just received by the related Mu...
RAW_TIME time() const
The timer::RTTRawTime at which this event occurred.
uint8_t ready() const
Indicate if this event was produced tdue to an echo pulse trailing edge just received by the related ...
SonarEvent()
Default constructor.
General utilities API that have broad application in programs.