|
luat_soc_sdk_2024 V1.0
|
宏定义 | |
| #define | LUAT_DEBUG_PRINT(fmt, argv...) luat_debug_print("%s %d:"fmt, __FUNCTION__,__LINE__, ##argv) |
| luat_debug_print宏定义为LUAT_DEBUG_PRINT | |
| #define | LUAT_DEBUG_ASSERT(condition, fmt, argv...) |
| luat_debug_assert宏定义为LUAT_DEBUG_ASSERT | |
类型定义 | |
| typedef enum LUAT_DEBUG_FAULT_MODE | LUAT_DEBUG_FAULT_MODE_E |
| 出现异常后系统处理 | |
枚举 | |
| enum | LUAT_DEBUG_FAULT_MODE { LUAT_DEBUG_FAULT_RESET , LUAT_DEBUG_FAULT_HANG , LUAT_DEBUG_FAULT_HANG_RESET , LUAT_DEBUG_FAULT_SAVE_RESET } |
| 出现异常后系统处理 更多... | |
函数 | |
| void | luat_debug_print (const char *fmt,...) |
| 格式打印并输出到LOG口 | |
| void | luat_debug_assert (const char *fun_name, unsigned int line_no, const char *fmt,...) |
| 断言处理,并格式打印输出到LOG口 | |
| void | luat_debug_set_fault_mode (LUAT_DEBUG_FAULT_MODE_E mode) |
| 设置出现异常后系统处理模式 | |
| void | luat_debug_print_onoff (unsigned char onoff) |
| 是否开启/停止csdk log | |
| #define LUAT_DEBUG_ASSERT | ( | condition, | |
| fmt, | |||
| argv... ) |
luat_debug_assert宏定义为LUAT_DEBUG_ASSERT
在文件 luat_debug.h 第 67 行定义.
| #define LUAT_DEBUG_PRINT | ( | fmt, | |
| argv... ) luat_debug_print("%s %d:"fmt, __FUNCTION__,__LINE__, ##argv) |
| typedef enum LUAT_DEBUG_FAULT_MODE LUAT_DEBUG_FAULT_MODE_E |
出现异常后系统处理
出现异常后系统处理
| 枚举值 | |
|---|---|
| LUAT_DEBUG_FAULT_RESET | 出现异常后重启,批量产品强烈建议用 |
| LUAT_DEBUG_FAULT_HANG | 出现异常后死机,测试阶段强烈建议用 |
| LUAT_DEBUG_FAULT_HANG_RESET | 出现异常后尝试上传死机信息给PC工具,上传成功或者超时后重启 |
| LUAT_DEBUG_FAULT_SAVE_RESET | 出现异常后保存信息到flash,然后重启 |
在文件 luat_debug.h 第 34 行定义.
| void luat_debug_assert | ( | const char * | fun_name, |
| unsigned int | line_no, | ||
| const char * | fmt, | ||
| ... ) |
断言处理,并格式打印输出到LOG口
| fun_name | 断言的函数 |
| line_no | 行号 |
| fmt | 格式 |
| ... | 后续变量 |
| void luat_debug_print | ( | const char * | fmt, |
| ... ) |
格式打印并输出到LOG口
| fmt | 格式 |
| ... | 后续变量 |
| void luat_debug_print_onoff | ( | unsigned char | onoff | ) |
是否开启/停止csdk log
| onoff | 开关 0关闭 1打开,开机默认开状态 |
| void luat_debug_set_fault_mode | ( | LUAT_DEBUG_FAULT_MODE_E | mode | ) |
设置出现异常后系统处理模式
| mode | 处理模式 LUAT_DEBUG_FAULT_RESET 重启模式 LUAT_DEBUG_FAULT_HANG 死机模式 |