diff --git a/libraries/AP_HAL/system.cpp b/libraries/AP_HAL/system.cpp index bb94ffedb3..1cdbd80c32 100644 --- a/libraries/AP_HAL/system.cpp +++ b/libraries/AP_HAL/system.cpp @@ -5,6 +5,11 @@ uint16_t WEAK AP_HAL::millis16() return millis() & 0xFFFF; } +uint16_t WEAK AP_HAL::micros16() +{ + return micros() & 0xFFFF; +} + void WEAK AP_HAL::dump_stack_trace() { // stack dump not available on this platform diff --git a/libraries/AP_HAL/system.h b/libraries/AP_HAL/system.h index e230d7c02d..c93a7f9f0b 100644 --- a/libraries/AP_HAL/system.h +++ b/libraries/AP_HAL/system.h @@ -12,6 +12,7 @@ void init(); void panic(const char *errormsg, ...) FMT_PRINTF(1, 2) NORETURN; +uint16_t micros16(); uint32_t micros(); uint32_t millis(); uint16_t millis16();