mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 16:48:29 -04:00
HAL_ChibiOS: added micros16() method
This commit is contained in:
parent
1283d42fbf
commit
5714ee113f
@ -267,6 +267,17 @@ uint32_t micros()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint16_t micros16()
|
||||||
|
{
|
||||||
|
#if CH_CFG_ST_RESOLUTION == 32 && CH_CFG_ST_FREQUENCY==1000000U
|
||||||
|
return st_lld_get_counter() & 0xFFFF;
|
||||||
|
#elif CH_CFG_ST_RESOLUTION == 16 && CH_CFG_ST_FREQUENCY==1000000U
|
||||||
|
return st_lld_get_counter();
|
||||||
|
#else
|
||||||
|
return hrt_micros32() & 0xFFFF;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t millis()
|
uint32_t millis()
|
||||||
{
|
{
|
||||||
return hrt_millis32();
|
return hrt_millis32();
|
||||||
|
Loading…
Reference in New Issue
Block a user