• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2022 Beken Corporation
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 
17 #pragma once
18 
19 #include <stdlib.h>
20 #include <string.h>
21 #include <common/bk_include.h>
22 #include "cli_config.h"
23 #include "param_config.h"
24 #include "bk_cli.h"
25 #include <os/str.h>
26 #include <os/mem.h>
27 #include <os/os.h>
28 #include <components/log.h>
29 #include <common/sys_config.h>
30 #include <driver/uart.h>
31 #include "bk_uart.h"
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
37 #define CLI_TAG "cli"
38 
39 #define CLI_LOGI(...) BK_LOGI(CLI_TAG, ##__VA_ARGS__)
40 #define CLI_LOGW(...) BK_LOGW(CLI_TAG, ##__VA_ARGS__)
41 #define CLI_LOGE(...) BK_LOGE(CLI_TAG, ##__VA_ARGS__)
42 #define CLI_LOGD(...) BK_LOGD(CLI_TAG, ##__VA_ARGS__)
43 
44 #define CLI_RET_ON_INVALID_ARGC(_actual_argc, _expect_minimum_argc) do {\
45 		if ((_actual_argc) < (_expect_minimum_argc)) {\
46 			CLI_LOGE("invalid argc, expect %d actual %d\n", (_expect_minimum_argc), (_actual_argc));\
47 			return;\
48 		}\
49 	}while(0)
50 
51 int cli_wifi_init(void);
52 int cli_ble_init(void);
53 int cli_netif_init(void);
54 int cli_misc_init(void);
55 int cli_mem_init(void);
56 int cli_airkiss_init(void);
57 int cli_phy_init(void);
58 
59 #if CONFIG_LWIP
60 int cli_lwip_init(void);
61 #endif
62 
63 int cli_iperf_init(void);
64 int cli_pwr_init(void);
65 int cli_timer_init(void);
66 int cli_wdt_init(void);
67 int cli_trng_init(void);
68 int cli_efuse_init(void);
69 int cli_gpio_init(void);
70 int cli_os_init(void);
71 int cli_ota_init(void);
72 int cli_flash_init(void);
73 int cli_flash_test_init(void);
74 int cli_keyVaule_init(void);
75 int cli_matter_init(void);
76 
77 int cli_uart_init(void);
78 int cli_adc_init(void);
79 int cli_spi_init(void);
80 int cli_qspi_init(void);
81 int cli_i2c_init(void);
82 int cli_aon_rtc_init(void);
83 int cli_sd_init(void);
84 int cli_fatfs_init(void);
85 int cli_temp_detect_init(void);
86 int cli_security_init(void);
87 int cli_mico_init(void);
88 int cli_peri_init(void);
89 int cli_event_init(void);
90 int cli_pwm_init(void);
91 int cli_reg_init(void);
92 int cli_dma_init(void);
93 int cli_exception_init(void);
94 int cli_icu_init(void);
95 int cli_at_init(void);
96 #if CONFIG_SECURITYIP
97 int cli_vault_init(void);
98 #endif
99 int cli_aud_init(void);
100 int cli_aud_intf_init(void);
101 int cli_fft_init(void);
102 int cli_sbc_init(void);
103 int cli_touch_init(void);
104 int cli_jpeg_init(void);
105 int cli_lcd_init(void);
106 int cli_dma2d_init(void);
107 int cli_i2s_init(void);
108 int cli_uvc_init(void);
109 int cli_aud_cp0_init(void);
110 int cli_calendar_init(void);
111 int cli_jpegdec_init(void);
112 int cli_aec_init(void);
113 int cli_g711_init(void);
114 int cli_mp3_init(void);
115 int cli_dvp_init(void);
116 int cli_doorbell_init(void);
117 int cli_sdio_host_init(void);
118 int cli_psram_init(void);
119 
120 extern int hexstr2bin(const char *hex, u8 *buf, size_t len);
121 
122 #ifdef __cplusplus
123 }
124 #endif
125