AP_HAL: added micros16() method

fast method for both 16 and 32 bit timers
This commit is contained in:
Andrew Tridgell 2021-10-02 15:39:08 +10:00
parent 2aef3364bc
commit 1283d42fbf
2 changed files with 6 additions and 0 deletions

View File

@ -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

View File

@ -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();