mcs: Fix conversion of ticks to us on aarch64
Actually divide by KHz frequency when on a platform that uses a clock that does not have an integer MHz frequency for aarch64. Signed-off-by: Curtis Millar <curtis.millar@data61.csiro.au>
This commit is contained in:
parent
7749b33589
commit
7afebd31ee
1 changed files with 1 additions and 1 deletions
|
|
@ -24,7 +24,7 @@ static inline CONST ticks_t getMaxTicksToUs(void)
|
|||
static inline CONST time_t ticksToUs(ticks_t ticks)
|
||||
{
|
||||
#if USE_KHZ
|
||||
return (ticks * TIMER_CLOCK_KHZ) / TIMER_CLOCK_MHZ;
|
||||
return (ticks * KHZ_IN_MHZ) / TIMER_CLOCK_KHZ;
|
||||
#else
|
||||
return ticks / TIMER_CLOCK_MHZ;
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue