Common process - Initialization
更多...
#include "tuya_cloud_types.h"
浏览源代码.
|
#define | LOOP_TYPE_DAILY (1) |
|
#define | LOOP_TYPE_EVEN_ODD (3) |
|
#define | LOOP_TYPE_HOURLY (2) |
|
#define | LOOP_TYPE_INVALID (0xFE) |
|
#define | LOOP_TYPE_WEEKLY (0) |
|
|
typedef BYTE_T | LOOP_TYPE_T |
|
Common process - Initialization
- 作者
- liuka.nosp@m.ng@t.nosp@m.uya.c.nosp@m.om
- 版本
- 0.1
- 日期
- 2020-11-09
- 版权所有
- Copyright 2020-2021 Tuya Inc. All Rights Reserved.
◆ tuya_svc_timer_add()
OPERATE_RET tuya_svc_timer_add |
( |
ALARM_TIMER_S * |
pTimer, |
|
|
BOOL_T |
update_flash |
|
) |
| |
add timer task.
- 参数
-
[in] | pTimer | timer info |
[in] | update_flash | if need update timer to flash |
- 注解
- This API is used for adding timer task.
- 返回
- OPRT_OK on success. Others on error, please refer to tuya_error_code.h
◆ tuya_svc_timer_delete()
OPERATE_RET tuya_svc_timer_delete |
( |
CHAR_T * |
timer_id, |
|
|
BOOL_T |
update_flash |
|
) |
| |
delete timer task.
- 参数
-
[in] | timer_id | timer id |
[in] | update_flash | if need update timer to flash |
- 注解
- This API is used for deleting the timer task.
- 返回
- OPRT_OK on success. Others on error, please refer to tuya_error_code.h
◆ tuya_svc_timer_full_req()
VOID_T tuya_svc_timer_full_req |
( |
VOID_T |
| ) |
|
write timer full req flag.
- 参数
-
- 注解
- This API is used for get full timer.
- 返回
- void
◆ tuya_svc_timer_get_capacity()
UINT_T tuya_svc_timer_get_capacity |
( |
VOID_T |
| ) |
|
Get the capacity of timer task.
- 参数
-
- 注解
- This API is used for getting the capacity of timer task.
- 返回
- the capacity of timer task.
◆ tuya_svc_timer_get_data()
VOID_T tuya_svc_timer_get_data |
( |
uint8_t * |
timer_data | ) |
|
get timer task data.
- 参数
-
[out] | timer_data | timer id and crc32 |
- 注解
- This API is used for getting timer task data.
- 返回
- void
◆ tuya_svc_timer_get_num()
UINT_T tuya_svc_timer_get_num |
( |
VOID_T |
| ) |
|
Get the num of timer task.
- 参数
-
- 注解
- This API is used for getting the num of timer task.
- 返回
- the capacity of timer task.
◆ tuya_svc_timer_get_task_count()
UINT_T tuya_svc_timer_get_task_count |
( |
VOID_T |
| ) |
|
Get the count of timer task.
- 参数
-
- 注解
- This API is used for getting the count of timer task.
- 返回
- the count of timer task.
◆ tuya_svc_timer_task_clear_db()
OPERATE_RET tuya_svc_timer_task_clear_db |
( |
VOID_T |
| ) |
|
Clear up the timer task data in flash.
- 参数
-
- 注解
- This API is used to clear up the timer task data in flash.
- 返回
- OPRT_OK on success. Others on error, please refer to tuya_error_code.h
◆ tuya_svc_timer_task_init()
OPERATE_RET tuya_svc_timer_task_init |
( |
UINT_T |
increase_unit | ) |
|
Init a timer task.
- 参数
-
[in] | increase_unit | increase unit |
- 注解
- This API is used for initializing the timer task. when the task queue is full, it will expand the size with the unit user input.
- 返回
- OPRT_OK on success. Others on error, please refer to tuya_error_code.h
◆ tuya_svc_timer_task_reset()
OPERATE_RET tuya_svc_timer_task_reset |
( |
VOID_T |
| ) |
|
Reset the timer task.
- 参数
-
- 注解
- This API is used to reset the timer task. the resource of timer task will be released.
- 返回
- OPRT_OK on success. Others on error, please refer to tuya_error_code.h