Branch: refs/heads/master Home: https://github.com/OpenAMP/libmetal Commit: 30af011301c5778075266e4b5189e61a35093265 https://github.com/OpenAMP/libmetal/commit/30af011301c5778075266e4b5189e61a3... Author: Ed Mooring ed.mooring@xilinx.com Date: 2020-10-15 (Thu, 15 Oct 2020)
Changed paths: M lib/system/freertos/sleep.h M lib/system/freertos/time.c M test/system/freertos/sleep.c
Log Message: ----------- FreeRTOS: fix sleep and timestamp handling
libmetal's libmetal_sleep_usec() takes a sleep time in micro-seconds. The FreeRTOS function underlying it takes a sleep time in task ticks. This was not properly corrected for, resulting in sleep times that were off by an order of magnitude. The test code attempted to correct for this as well, in the same wrong way.
Lastly, the metal_get_timestamp() function returned a value in task ticks alone. This is a configuration dependent value.
This patch changes all three places to use microseconds for the input and output values.
Signed-off-by: Ed Mooring ed.mooring@linaro.org