下载 FreeRTOS
 

出色的 RTOS & 嵌入式软件

内核
最新资讯
简化任何设备的身份验证云连接。
利用 CoAP 设计节能型云连接 IoT 解决方案。
11.0.0 版 FreeRTOS 内核简介:
FreeRTOS 路线图和代码贡献流程。
使用 FreeRTOS 实现 OPC-UA over TSN。

xTimerGetPeriod
[定时器 API]

timers.h
 TickType_t xTimerGetPeriod( TimerHandle_t xTimer );

返回一个软件计时器的周期。 周期以滴答为单位。

初始时,一个定时器的周期由 用于创建定时器的 xTimerCreate() 函数的 xTimerPeriod 参数设置。 可以使用 xTimerChangePeriod()xTimerChangePeriodFromISR() API 函数改变此周期。

参数:
xTimer   被查询的定时器。
返回:
计时器的周期,以滴答为单位。
用法示例:

/* 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.