XFusion API v1.3.0
|
结构体 | |
struct | example_scan_context_s |
扫描任务无栈协程上下文。 更多... | |
struct | example_authenticate_mode_message_s |
认证模式与字符串消息。 更多... | |
宏定义 | |
#define | EXAMPLE_SCAN_CHANNEL_START 1 |
#define | EXAMPLE_SCAN_CHANNEL_END 13 |
#define | EXAMPLE_SCAN_RESULT_SIZE 20 |
#define | EXAMPLE_SCAN_BLOCK_IS_ENABLE 1 |
#define | EXAMPLE_SCAN_BLOCK true |
#define | EXAMPLE_WIFI_NTASK_PRIORITY 15 |
#define | EXAMPLE_WIFI_NTASK_PERIOD_MS 10 |
#define | TBL_IT(v) {v, XSTR(v)} |
#define | ERROR_CHECK(expression) |
类型定义 | |
typedef struct example_scan_context_s | ex_scan_ctx_t |
typedef struct example_authenticate_mode_message_s | ex_auth_mode_msg_t |
函数 | |
static void | _error_check_failed (void) |
static void | _wifi_sta_event_handler (xf_wifi_event_id_t event_id, void *event_data, void *user_args) |
static const char * | ex_auth_mode_to_name (xf_wifi_auth_mode_t code) |
static void | _wifi_ntask (xf_task_t task) |
void | xf_main (void) |
全局函数定义: [Global Functions]. | |
变量 | |
static const char * | TAG = "scan" |
static ex_scan_ctx_t | ctx = {0} |
static ex_scan_ctx_t * | sp_ctx = &ctx |
#define EXAMPLE_SCAN_CHANNEL_START 1 |
#define EXAMPLE_SCAN_CHANNEL_END 13 |
#define EXAMPLE_SCAN_BLOCK true |
#define TBL_IT | ( | v | ) | {v, XSTR(v)} |
#define ERROR_CHECK | ( | expression | ) |
typedef struct example_scan_context_s ex_scan_ctx_t |
typedef struct example_authenticate_mode_message_s ex_auth_mode_msg_t |
|
static |
|
static |
void xf_main | ( | void | ) |
全局函数定义: [Global Functions].
主函数。 正常情况下此行空白:函数之间需要有一个空行作为分隔
< 用于接收 _xf_template_func 的传出
< 防止警告
分支语句哪怕只有一句也必须加花括号。
判断语句中,如果一行不足以放下判断语句, 分行时需要将逻辑符号放在新行的开头。 此时最好还是用变量表达判断语句。
常量在前可以避免不必要的逻辑错误。 如 if (XF_TEMPL_FAIL = ret) 时编译会报错。
对于返回值为 void 的函数, return;
可有可无,文件风格统一即可。
注意! xf_init() 会在 xf_main() 前运行,此处不需要重复调用 xf_init()!
此示例仅用于演示自动初始化的使用方法。
< 所有等级打印都带有全部信息
< 过滤文件名为 "file1.c" 的打印
< 打开过滤器
< 设置过滤器为黑名单
< 不用彩色打印
< 启用彩色打印
|
static |
|
static |