1 /*
2  * Copyright (C) 2015-2021 Alibaba Group Holding Limited
3  */
4 
5 #include "aos/kernel.h"
6 #include <aos_cpp.h>
7 #include <iostream>
8 #include <stdio.h>
9 
10 #if AOS_COMP_CLI
11 #include "aos/cli.h"
12 #endif
13 
14 using namespace std;
15 
16 void test_inheritance(void);
17 void test_thread(void);
18 void test_timer(void);
19 void test_queue(void);
20 void test_semaphore(void);
21 void test_mutex(void);
22 void test_workqueue(void);
23 
cpp_aos_example(int argc,char ** argv)24 static void cpp_aos_example(int argc, char **argv)
25 {
26     printf("hello world C!\n");
27     cout << "hello world C++!" << endl;
28 
29     test_inheritance();
30     test_thread();
31     test_timer();
32     test_queue();
33     test_semaphore();
34     test_mutex();
35     test_workqueue();
36 
37     return;
38 }
39 
40 #if AOS_COMP_CLI
41 /* reg args: fun, cmd, description*/
42 ALIOS_CLI_CMD_REGISTER(cpp_aos_example, cpp_aos, basic aos cpp api example)
43 #endif
44