17#ifndef FINSH_THREAD_PRIORITY
18 #define FINSH_THREAD_PRIORITY 20
20#ifndef FINSH_THREAD_STACK_SIZE
21 #define FINSH_THREAD_STACK_SIZE 2048
24 #define FINSH_CMD_SIZE 80
27#define FINSH_OPTION_ECHO 0x01
29#define FINSH_PROMPT finsh_get_prompt()
33#ifdef FINSH_USING_HISTORY
34 #ifndef FINSH_HISTORY_LINES
35 #define FINSH_HISTORY_LINES 5
39#ifdef FINSH_USING_AUTH
40 #ifndef FINSH_PASSWORD_MAX
41 #define FINSH_PASSWORD_MAX RT_NAME_MAX
43 #ifndef FINSH_PASSWORD_MIN
44 #define FINSH_PASSWORD_MIN 6
46 #ifndef FINSH_DEFAULT_PASSWORD
47 #define FINSH_DEFAULT_PASSWORD "rtthread"
51#ifndef FINSH_THREAD_NAME
52 #define FINSH_THREAD_NAME "tshell"
70#ifdef FINSH_USING_HISTORY
81#if !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE)
85#ifdef FINSH_USING_AUTH
86 char password[FINSH_PASSWORD_MAX];
100#ifdef FINSH_USING_AUTH
101 rt_err_t finsh_set_password(
const char *password);
102 const char *finsh_get_password(
void);
struct rt_device * rt_device_t
void finsh_thread_entry_sethook(void(*hook)(void))
This function set a hook function at the entry of finsh thread
rt_uint32_t finsh_get_echo(void)
rt_uint32_t finsh_get_prompt_mode(void)
void finsh_set_prompt_mode(rt_uint32_t prompt_mode)
void finsh_set_echo(rt_uint32_t echo)
const char * finsh_get_device(void)
unsigned short rt_uint16_t
int finsh_system_init(void)
const char * finsh_get_prompt(void)
int finsh_set_prompt(const char *prompt)
struct rt_semaphore rx_sem
rt_uint16_t line_position
char line[FINSH_CMD_SIZE+1]