|
TuyaOS
|
Common process - Initialization 更多...
#include "tuya_cloud_types.h"

类型定义 | |
| typedef VOID_T(* | TAL_TIMER_CB) (TIMER_ID timer_id, VOID_T *arg) |
| typedef PVOID_T | TIMER_ID |
枚举 | |
| enum | TIMER_TYPE { TAL_TIMER_ONCE = 0 , TAL_TIMER_CYCLE } |
| the type of timer | |
函数 | |
| OPERATE_RET | tal_sw_timer_create (TAL_TIMER_CB func, VOID_T *arg, TIMER_ID *timer_id) |
| create a software timer 更多... | |
| OPERATE_RET | tal_sw_timer_delete (TIMER_ID timer_id) |
| Delete the software timer 更多... | |
| INT_T | tal_sw_timer_get_num (VOID_T) |
| Get timer node currently 更多... | |
| OPERATE_RET | tal_sw_timer_init (VOID_T) |
| Initializing the software timer 更多... | |
| BOOL_T | tal_sw_timer_is_running (TIMER_ID timer_id) |
| Identify the software timer is running 更多... | |
| OPERATE_RET | tal_sw_timer_release (VOID_T) |
| Release all resource of the software timer 更多... | |
| OPERATE_RET | tal_sw_timer_remain_time_get (TIMER_ID timer_id, UINT_T *remain_time) |
| Identify the software timer is running 更多... | |
| OPERATE_RET | tal_sw_timer_start (TIMER_ID timer_id, TIME_MS time_ms, TIMER_TYPE timer_type) |
| Start the software timer 更多... | |
| OPERATE_RET | tal_sw_timer_stop (TIMER_ID timer_id) |
| Stop the software timer 更多... | |
| OPERATE_RET | tal_sw_timer_trigger (TIMER_ID timer_id) |
| Trigger the software timer 更多... | |
Common process - Initialization
| OPERATE_RET tal_sw_timer_create | ( | TAL_TIMER_CB | func, |
| VOID_T * | arg, | ||
| TIMER_ID * | timer_id | ||
| ) |
create a software timer
| [in] | func | the processing function of the timer |
| [in] | arg | the parameater of the timer function |
| [out] | timer_id | timer id |
| OPERATE_RET tal_sw_timer_delete | ( | TIMER_ID | timer_id | ) |
Delete the software timer
| [in] | timer_id | timer id |
| INT_T tal_sw_timer_get_num | ( | VOID_T | ) |
Get timer node currently
| VOID |
| OPERATE_RET tal_sw_timer_init | ( | VOID_T | ) |
Initializing the software timer
| VOID |
| BOOL_T tal_sw_timer_is_running | ( | TIMER_ID | timer_id | ) |
Identify the software timer is running
| [in] | timer_id | timer id |
| OPERATE_RET tal_sw_timer_release | ( | VOID_T | ) |
Release all resource of the software timer
| VOID |
| OPERATE_RET tal_sw_timer_remain_time_get | ( | TIMER_ID | timer_id, |
| UINT_T * | remain_time | ||
| ) |
Identify the software timer is running
| [in] | timer_id | timer id |
| [in] | remain_time | ms |
| OPERATE_RET tal_sw_timer_start | ( | TIMER_ID | timer_id, |
| TIME_MS | time_ms, | ||
| TIMER_TYPE | timer_type | ||
| ) |
Start the software timer
| [in] | timer_id | timer id |
| [in] | time_ms | timer running cycle |
| [in] | timer_type | timer type |
| OPERATE_RET tal_sw_timer_stop | ( | TIMER_ID | timer_id | ) |
Stop the software timer
| [in] | timer_id | timer id |
| OPERATE_RET tal_sw_timer_trigger | ( | TIMER_ID | timer_id | ) |
Trigger the software timer
| [in] | timer_id | timer id |