TuyaOS
tkl_init_common.h
浏览该文件的文档.
1
10#ifndef __TKL_INIT_COMMON_H__
11#define __TKL_INIT_COMMON_H__
12
13#include "tuya_cloud_types.h"
14#include "tkl_rtc.h"
15#include "tkl_watchdog.h"
16#include "tkl_flash.h"
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22/*
23 * @brief the description of tuya kernel adapter layer rtc
24 */
25typedef struct {
26 OPERATE_RET (*init) (VOID_T);
27 OPERATE_RET (*deinit) (VOID_T);
28 OPERATE_RET (*time_get) (TIME_T *time_sec);
29 OPERATE_RET (*time_set) (TIME_T time_sec);
31
38
39
43typedef struct {
44 UINT_T (*init) (TUYA_WDOG_BASE_CFG_T *cfg);
45 OPERATE_RET (*deinit) (VOID_T);
46 OPERATE_RET (*refresh) (VOID_T);
48
55
59typedef struct {
60 OPERATE_RET (*read) (CONST UINT_T addr, UCHAR_T *dst, CONST UINT_T size);
61 OPERATE_RET (*write) (CONST UINT_T addr, CONST UCHAR_T *src, CONST UINT_T size);
62 OPERATE_RET (*erase) (CONST UINT_T addr, CONST UINT_T size);
63 OPERATE_RET (*lock) (CONST UINT_T addr, CONST UINT_T size);
64 OPERATE_RET (*unlock) (CONST UINT_T addr, CONST UINT_T size);
65 OPERATE_RET (*get_one_type_info) (TUYA_FLASH_TYPE_E type, TUYA_FLASH_BASE_INFO_T* info);
67
74
75
76#ifdef __cplusplus
77} // extern "C"
78#endif
79
80#endif // __TKL_INIT_COMMON_H__
81
82
83
the description of tuya kernel adapter layer flash
Definition: tkl_init_common.h:59
Definition: tkl_init_common.h:25
the description of tuya kernel adapter layer watchdog
Definition: tkl_init_common.h:43
Definition: tuya_cloud_types.h:393
Definition: tuya_cloud_types.h:1210
Common process - adapter the flash api
TKL_FLASH_DESC_T * tkl_flash_desc_get(VOID_T)
register flash description to tuya object manage
TKL_WATCHDOG_DESC_T * tkl_watchdog_desc_get(VOID_T)
register watchdog description to tuya object manage
TKL_RTC_DESC_T * tkl_rtc_desc_get(VOID_T)
register rtc description to tuya object manage
Common process - adapter the rtc api
Common process - adapter the watchdog api