timers.h
TickType_t xTimerGetPeriod( TimerHandle_t xTimer );
Returns the period of a software timer. The period is specified in ticks.
The period of a timer is initially set using the xTimerPeriod parameter of the call to
xTimerCreate() used to
create the timer. It can then be changed using the
xTimerChangePeriod()
and xTimerChangePeriodFromISR()
API functions.
-
Parameters:
-
xTimer
|
The timer being queried.
|
-
Returns:
-
The period of the timer, in ticks.
Example usage:
/* A callback function assigned to a software timer. */
static void prvExampleTimerCallback( TimerHandle_t xTimer )
{
TickType_t xTimerPeriod;
/* Query the period of the timer that expires. */
xTimerPeriod = xTimerGetPeriod( xTimer );
}
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.