mirror of
https://github.com/FreeRTOS/Lab-Project-FreeRTOS-POSIX.git
synced 2025-10-19 02:23:55 +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
|
||||
{
|
||||
/* Set the timer to expire at the it_value, then start it. */
|
||||
( void ) xTimerChangePeriod( xTimer, xNextTimerExpiration, portMAX_DELAY );
|
||||
xTimerCommandSent = xTimerStart( xTimer, xNextTimerExpiration );
|
||||
xTimerCommandSent = xTimerChangePeriod( xTimer, xNextTimerExpiration, xNextTimerExpiration );
|
||||
|
||||
/* Wait until the timer start command is processed. */
|
||||
while( ( xTimerCommandSent != pdFAIL ) && ( xTimerIsTimerActive( xTimer ) == pdFALSE ) )
|
||||
|
Reference in New Issue
Block a user