Opposite of pdMS_TO_TICKS?
This may be a bit of a dumb question but is there an opposite function / macro to pdMSTOTICKS() that converts a number of ticks to millseconds or seconds?
-Andy.
Opposite of pdMS_TO_TICKS?
If
pdMS_TO_TICKS()
is defined as:
~~~
define pdMSTOTICKS( xTimeInMs ) ( ( xTimeInMs * configTICKRATEHZ ) / 1000 )
~~~ the oppositve would be like: ~~~define pdTICKSTOMS( xTicks ) ( ( xTicks * 1000 ) / configTICKRATEHZ )
~~~ Or with some proper casts: ~~~define pdTICKSTOMS( xTicks ) ( ( ( TickTypet ) ( xTicks ) * 1000u ) / configTICKRATE_HZ )
~~~Opposite of pdMS_TO_TICKS?
Thanks Hein,
That is just the ticket.
-Andy.