| |
Create a software timer.
-
Description:
-
This API is used to create a software timer that has specified timing duration, timeout handling function, and trigger mode, and to return a handle by which the software timer can be referenced.
-
注意:
-
- Do not use the delay interface in the callback function that handles software timer timeout.
- Threre are LOSCFG_BASE_CORE_SWTMR_LIMIT timers available, change it's value when necessory.
-
参数:
-
|
参数名称 |
描述 |
|
uwInterval |
[IN] Timing duration of the software timer to be created (unit: ms). |
|
ucMode |
[IN] Software timer mode. Pass in one of the modes specified by enSwTmrType. There are three types of modes, one-off, periodic, and continuously periodic after one-off, of which the third mode is not supported temporarily. |
|
pfnHandler |
[IN] Callback function that handles software timer timeout. |
|
pusSwTmrID |
[OUT] Software timer ID created by LOS_SwtmrCreate. |
|
uwArg |
[IN] Parameter passed in when the callback function that handles software timer timeout is called. |
-
返回值:
-
-
Dependency:
-
- los_swtmr.h: the header file that contains the API declaration.
-
参见:
-
LOS_SwtmrDelete
-
自从:
-
Huawei LiteOS V100R001C00
|