TuyaOS
tuya_hal_system.h
浏览该文件的文档.
1
10#ifndef _TUYA_HAL_SYSTEM_H
11#define _TUYA_HAL_SYSTEM_H
12
13#include "tal_system.h"
14#include "tal_sleep.h"
15#include "tal_watchdog.h"
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21#define TY_CPU_SLEEP TUYA_CPU_SLEEP
22#define TY_CPU_DEEP_SLEEP TUYA_CPU_DEEP_SLEEP
23
24
34#define tuya_hal_get_systemtickcount() tal_system_get_millisecond()
35
45#define tuya_hal_get_tickratems() 1
55#define tuya_hal_system_sleep(msTime) tal_system_sleep(msTime)
56
67
77#define tuya_hal_watchdog_refresh() tal_watchdog_refresh()
78
88#define tuya_hal_watchdog_stop() tal_watchdog_stop()
89
99#define tuya_hal_system_getheapsize() tal_system_get_free_heap_size()
100
110#define tuya_hal_system_get_rst_info() tal_system_get_reset_reason(NULL)
111
121#define tuya_hal_system_get_rst_ext_info(ext_info) tal_system_get_reset_reason(ext_info)
122
132#define tuya_hal_get_trandom_data(range) tal_system_get_random(range)
133
144#define tuya_hal_set_cpu_lp_mode(en, mode) tal_cpu_sleep_mode_set(en, mode)
145
155UINT_T tuya_hal_watchdog_init_start(const unsigned int timeval);
156
157int tuya_hal_get_random_data(const unsigned int range);
158
159#ifdef __cplusplus
160}
161#endif /* __cplusplus */
162
163#endif
164
Common process - adpater some api which provide by OS
Common process - adapter the watchdog api
UINT_T tuya_hal_watchdog_init_start(const unsigned int timeval)
Watch dog init and start
void tuya_hal_system_reset(void)
System reset