mirror of
https://github.com/FreeRTOS/Lab-Project-FreeRTOS-POSIX.git
synced 2025-10-19 19:54:03 +08:00
Remove abundant timer start in timer_settime
xTimerChangePeriod() can make soft timer be active. Signed-off-by: wangfei_chen <wangfei_chen@realsil.com.cn>
This commit is contained in:
@@ -283,8 +283,7 @@ int timer_settime( timer_t timerid,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Set the timer to expire at the it_value, then start it. */
|
/* Set the timer to expire at the it_value, then start it. */
|
||||||
( void ) xTimerChangePeriod( xTimer, xNextTimerExpiration, portMAX_DELAY );
|
xTimerCommandSent = xTimerChangePeriod( xTimer, xNextTimerExpiration, xNextTimerExpiration );
|
||||||
xTimerCommandSent = xTimerStart( xTimer, xNextTimerExpiration );
|
|
||||||
|
|
||||||
/* Wait until the timer start command is processed. */
|
/* Wait until the timer start command is processed. */
|
||||||
while( ( xTimerCommandSent != pdFAIL ) && ( xTimerIsTimerActive( xTimer ) == pdFALSE ) )
|
while( ( xTimerCommandSent != pdFAIL ) && ( xTimerIsTimerActive( xTimer ) == pdFALSE ) )
|
||||||
|
Reference in New Issue
Block a user