1 /*
2 * Copyright (C) 2015-2021 Alibaba Group Holding Limited
3 */
4
5 #if AOS_COMP_CLI
6 #include "aos/cli.h"
7 #endif
8 #include "uservice/uservice.h"
9 #include "uservice/eventid.h"
10
11 #include "ble_netconfig.h"
12
ble_netcfg_callback(BLECFG_EVENT event,BLECFG_STATE state,void * event_data)13 int ble_netcfg_callback(BLECFG_EVENT event, BLECFG_STATE state, void *event_data)
14 {
15 return 0;
16 }
17
netcfg_comp_example(int argc,char ** argv)18 static void netcfg_comp_example(int argc, char **argv)
19 {
20 int ret;
21
22 ret = BleCfg_stack_init(ble_netcfg_callback);
23 if (ret) {
24 printf("error: BLE Net Config initial! ret %x\r\n", ret);
25 }
26 ret = BleCfg_stack_start();
27 if (ret) {
28 printf("error: BLE Net Config start! ret %x\r\n", ret);
29 }
30 }
31
32 #if AOS_COMP_CLI
33 ALIOS_CLI_CMD_REGISTER(netcfg_comp_example, netcfg_example, netcfg component base example);
34 #endif
35