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 #ifndef _shell_task_h_ 16 #define _shell_task_h_ 17 18 #ifdef __cplusplus 19 extern "C" { 20 #endif 21 22 #include <stdarg.h> 23 24 int handle_shell_input(char *inbuf, int in_buf_size, char * outbuf, int out_buf_size); 25 void shell_task(void *pvParameters); 26 27 #ifdef CONFIG_MASTER_CORE 28 int shell_cmd_forward(char *cmd, u16 cmd_len); 29 #endif 30 31 int shell_assert_out(bool bContinue, char * format, ...); 32 int shell_assert_raw(bool bContinue, char * data_buff, u16 data_len); 33 int shell_trace_out( u32 trace_id, ... ); 34 int shell_spy_out( u16 spy_id, u8 * data_buf, u16 data_len); 35 int shell_log_out(u8 level, char * mod_name, const char * format, ...); 36 void shell_log_out_port(int level, char * mod_name, const char * format, va_list ap); 37 int shell_log_raw_data(const u8 *data, u16 data_len); 38 39 int shell_echo_get(void); 40 void shell_echo_set(int en_flag); 41 void shell_set_log_level(int level); 42 int shell_get_log_level(void); 43 int shell_get_log_statist(u32 * info_list, u32 num); 44 45 void shell_log_flush(void); 46 void shell_set_uart_port(uint8_t uart_port); 47 48 #ifdef __cplusplus 49 } 50 #endif 51 52 #endif /* _shell_task_h_ */ 53