1 /*
2  * Copyright (C) 2015-2021 Alibaba Group Holding Limited
3  */
4 #include "stdlib.h"
5 #include <aos/kernel.h>
6 #ifdef AOS_COMP_CLI
7 #include "aos/cli.h"
8 #endif
9 
10 extern int amp_main(void);
11 
amp_entry(void * arg)12 static void amp_entry(void * arg) {
13     int ret;
14     (void *)arg;
15 
16     ret = amp_main();
17     if (ret != 0) {
18         printf("start amp task error. ret = %d\r\n", ret);
19     }
20 }
21 
amp_comp_example(int argc,char ** argv)22 static void amp_comp_example(int argc, char **argv)
23 {
24     (void)argc;
25     (void)argv;
26     aos_task_t amp_task;
27 
28     aos_task_new_ext(&amp_task, "amp_task", amp_entry, NULL, 8192, AOS_DEFAULT_APP_PRI - 2);
29 
30     printf("amp comp test success!\r\n");
31     return;
32 }
33 
34 #ifdef AOS_COMP_CLI
35 /* reg args: fun, cmd, description*/
36 ALIOS_CLI_CMD_REGISTER(amp_comp_example, amp_example, amp component base example)
37 #endif
38