AP_HAL: added delay_microseconds_boost()

this will be used by wait_for_sample() to boost priority for a short
period at the end of each delay_microseconds()
This commit is contained in:
Andrew Tridgell 2015-02-16 11:52:37 +11:00
parent f54d799bff
commit c63540f7b1

View File

@ -20,7 +20,22 @@ public:
virtual uint64_t millis64() = 0;
virtual uint64_t micros64() = 0;
#endif
/*
delay for the given number of microseconds. This needs to be as
accurate as possible - preferably within 100 microseconds.
*/
virtual void delay_microseconds(uint16_t us) = 0;
/*
delay for the given number of microseconds. On supported
platforms this boosts the priority of the main thread for a
short time when the time completes. The aim is to ensure the
main thread runs at a higher priority than drivers for the start
of each loop
*/
virtual void delay_microseconds_boost(uint16_t us) { delay_microseconds(us); }
virtual void register_delay_callback(AP_HAL::Proc,
uint16_t min_time_ms) = 0;