Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wwsmg1
rt-thread
提交
abdcd80d
R
rt-thread
项目概览
wwsmg1
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
abdcd80d
编写于
1月 05, 2014
作者:
B
Bernard Xiong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[Finsh] Add more command in msh
上级
053f579e
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
25 addition
and
10 deletion
+25
-10
components/finsh/SConscript
components/finsh/SConscript
+2
-1
components/finsh/cmd.c
components/finsh/cmd.c
+19
-8
components/finsh/finsh.h
components/finsh/finsh.h
+4
-0
components/finsh/msh_cmd.c
components/finsh/msh_cmd.c
+0
-1
未找到文件。
components/finsh/SConscript
浏览文件 @
abdcd80d
...
@@ -35,7 +35,8 @@ if rtconfig.CROSS_TOOL == 'keil':
...
@@ -35,7 +35,8 @@ if rtconfig.CROSS_TOOL == 'keil':
else
:
else
:
LINKFLAGS
=
''
LINKFLAGS
=
''
src
=
src
+
msh_src
if
GetDepend
(
'FINSH_USING_MSH'
):
src
=
src
+
msh_src
if
not
GetDepend
(
'FINSH_USING_MSH_ONLY'
):
if
not
GetDepend
(
'FINSH_USING_MSH_ONLY'
):
src
=
src
+
fsh_src
src
=
src
+
fsh_src
...
...
components/finsh/cmd.c
浏览文件 @
abdcd80d
...
@@ -77,6 +77,7 @@ long version(void)
...
@@ -77,6 +77,7 @@ long version(void)
return
0
;
return
0
;
}
}
FINSH_FUNCTION_EXPORT
(
version
,
show
RT
-
Thread
version
information
);
FINSH_FUNCTION_EXPORT
(
version
,
show
RT
-
Thread
version
information
);
MSH_CMD_EXPORT
(
version
,
show
RT
-
Thread
version
information
);
extern
struct
rt_object_information
rt_object_container
[];
extern
struct
rt_object_information
rt_object_container
[];
...
@@ -117,6 +118,7 @@ long list_thread(void)
...
@@ -117,6 +118,7 @@ long list_thread(void)
return
_list_thread
(
&
rt_object_container
[
RT_Object_Class_Thread
].
object_list
);
return
_list_thread
(
&
rt_object_container
[
RT_Object_Class_Thread
].
object_list
);
}
}
FINSH_FUNCTION_EXPORT
(
list_thread
,
list
thread
);
FINSH_FUNCTION_EXPORT
(
list_thread
,
list
thread
);
MSH_CMD_EXPORT
(
list_thread
,
list
thread
);
static
void
show_wait_queue
(
struct
rt_list_node
*
list
)
static
void
show_wait_queue
(
struct
rt_list_node
*
list
)
{
{
...
@@ -171,7 +173,8 @@ long list_sem(void)
...
@@ -171,7 +173,8 @@ long list_sem(void)
{
{
return
_list_sem
(
&
rt_object_container
[
RT_Object_Class_Semaphore
].
object_list
);
return
_list_sem
(
&
rt_object_container
[
RT_Object_Class_Semaphore
].
object_list
);
}
}
FINSH_FUNCTION_EXPORT
(
list_sem
,
list
semaphone
in
system
)
FINSH_FUNCTION_EXPORT
(
list_sem
,
list
semaphone
in
system
);
MSH_CMD_EXPORT
(
list_sem
,
list
semaphore
in
system
);
#endif
#endif
#ifdef RT_USING_EVENT
#ifdef RT_USING_EVENT
...
@@ -209,7 +212,8 @@ long list_event(void)
...
@@ -209,7 +212,8 @@ long list_event(void)
{
{
return
_list_event
(
&
rt_object_container
[
RT_Object_Class_Event
].
object_list
);
return
_list_event
(
&
rt_object_container
[
RT_Object_Class_Event
].
object_list
);
}
}
FINSH_FUNCTION_EXPORT
(
list_event
,
list
event
in
system
)
FINSH_FUNCTION_EXPORT
(
list_event
,
list
event
in
system
);
MSH_CMD_EXPORT
(
list_event
,
list
event
in
system
);
#endif
#endif
#ifdef RT_USING_MUTEX
#ifdef RT_USING_MUTEX
...
@@ -239,7 +243,8 @@ long list_mutex(void)
...
@@ -239,7 +243,8 @@ long list_mutex(void)
{
{
return
_list_mutex
(
&
rt_object_container
[
RT_Object_Class_Mutex
].
object_list
);
return
_list_mutex
(
&
rt_object_container
[
RT_Object_Class_Mutex
].
object_list
);
}
}
FINSH_FUNCTION_EXPORT
(
list_mutex
,
list
mutex
in
system
)
FINSH_FUNCTION_EXPORT
(
list_mutex
,
list
mutex
in
system
);
MSH_CMD_EXPORT
(
list_mutex
,
list
mutex
in
system
);
#endif
#endif
#ifdef RT_USING_MAILBOX
#ifdef RT_USING_MAILBOX
...
@@ -282,7 +287,8 @@ long list_mailbox(void)
...
@@ -282,7 +287,8 @@ long list_mailbox(void)
{
{
return
_list_mailbox
(
&
rt_object_container
[
RT_Object_Class_MailBox
].
object_list
);
return
_list_mailbox
(
&
rt_object_container
[
RT_Object_Class_MailBox
].
object_list
);
}
}
FINSH_FUNCTION_EXPORT
(
list_mailbox
,
list
mail
box
in
system
)
FINSH_FUNCTION_EXPORT
(
list_mailbox
,
list
mail
box
in
system
);
MSH_CMD_EXPORT
(
list_mailbox
,
list
mail
box
in
system
);
#endif
#endif
#ifdef RT_USING_MESSAGEQUEUE
#ifdef RT_USING_MESSAGEQUEUE
...
@@ -323,7 +329,8 @@ long list_msgqueue(void)
...
@@ -323,7 +329,8 @@ long list_msgqueue(void)
{
{
return
_list_msgqueue
(
&
rt_object_container
[
RT_Object_Class_MessageQueue
].
object_list
);
return
_list_msgqueue
(
&
rt_object_container
[
RT_Object_Class_MessageQueue
].
object_list
);
}
}
FINSH_FUNCTION_EXPORT
(
list_msgqueue
,
list
message
queue
in
system
)
FINSH_FUNCTION_EXPORT
(
list_msgqueue
,
list
message
queue
in
system
);
MSH_CMD_EXPORT
(
list_msgqueue
,
list
message
queue
in
system
);
#endif
#endif
#ifdef RT_USING_MEMHEAP
#ifdef RT_USING_MEMHEAP
...
@@ -353,7 +360,8 @@ long list_memheap(void)
...
@@ -353,7 +360,8 @@ long list_memheap(void)
{
{
return
_list_memheap
(
&
rt_object_container
[
RT_Object_Class_MemHeap
].
object_list
);
return
_list_memheap
(
&
rt_object_container
[
RT_Object_Class_MemHeap
].
object_list
);
}
}
FINSH_FUNCTION_EXPORT
(
list_memheap
,
list
memory
heap
in
system
)
FINSH_FUNCTION_EXPORT
(
list_memheap
,
list
memory
heap
in
system
);
MSH_CMD_EXPORT
(
list_memheap
,
list
memory
heap
in
system
);
#endif
#endif
#ifdef RT_USING_MEMPOOL
#ifdef RT_USING_MEMPOOL
...
@@ -399,6 +407,7 @@ long list_mempool(void)
...
@@ -399,6 +407,7 @@ long list_mempool(void)
return
_list_mempool
(
&
rt_object_container
[
RT_Object_Class_MemPool
].
object_list
);
return
_list_mempool
(
&
rt_object_container
[
RT_Object_Class_MemPool
].
object_list
);
}
}
FINSH_FUNCTION_EXPORT
(
list_mempool
,
list
memory
pool
in
system
)
FINSH_FUNCTION_EXPORT
(
list_mempool
,
list
memory
pool
in
system
)
MSH_CMD_EXPORT
(
list_mempool
,
list
memory
pool
in
system
);
#endif
#endif
static
long
_list_timer
(
struct
rt_list_node
*
list
)
static
long
_list_timer
(
struct
rt_list_node
*
list
)
...
@@ -431,7 +440,8 @@ long list_timer(void)
...
@@ -431,7 +440,8 @@ long list_timer(void)
{
{
return
_list_timer
(
&
rt_object_container
[
RT_Object_Class_Timer
].
object_list
);
return
_list_timer
(
&
rt_object_container
[
RT_Object_Class_Timer
].
object_list
);
}
}
FINSH_FUNCTION_EXPORT
(
list_timer
,
list
timer
in
system
)
FINSH_FUNCTION_EXPORT
(
list_timer
,
list
timer
in
system
);
MSH_CMD_EXPORT
(
list_timer
,
list
timer
in
system
);
#ifdef RT_USING_DEVICE
#ifdef RT_USING_DEVICE
static
long
_list_device
(
struct
rt_list_node
*
list
)
static
long
_list_device
(
struct
rt_list_node
*
list
)
...
@@ -481,7 +491,8 @@ long list_device(void)
...
@@ -481,7 +491,8 @@ long list_device(void)
{
{
return
_list_device
(
&
rt_object_container
[
RT_Object_Class_Device
].
object_list
);
return
_list_device
(
&
rt_object_container
[
RT_Object_Class_Device
].
object_list
);
}
}
FINSH_FUNCTION_EXPORT
(
list_device
,
list
device
in
system
)
FINSH_FUNCTION_EXPORT
(
list_device
,
list
device
in
system
);
MSH_CMD_EXPORT
(
list_device
,
list
device
in
system
);
#endif
#endif
#ifdef RT_USING_MODULE
#ifdef RT_USING_MODULE
...
...
components/finsh/finsh.h
浏览文件 @
abdcd80d
...
@@ -344,8 +344,12 @@ struct finsh_sysvar* finsh_sysvar_lookup(const char* name);
...
@@ -344,8 +344,12 @@ struct finsh_sysvar* finsh_sysvar_lookup(const char* name);
* @param command the name of command.
* @param command the name of command.
* @param desc the description of command, which will show in help.
* @param desc the description of command, which will show in help.
*/
*/
#ifdef FINSH_USING_MSH
#define MSH_CMD_EXPORT(command, desc) \
#define MSH_CMD_EXPORT(command, desc) \
FINSH_FUNCTION_EXPORT_CMD(command, __cmd_##command, desc)
FINSH_FUNCTION_EXPORT_CMD(command, __cmd_##command, desc)
#else
#define MSH_CMD_EXPORT(command, desc)
#endif
struct
finsh_token
struct
finsh_token
{
{
...
...
components/finsh/msh_cmd.c
浏览文件 @
abdcd80d
...
@@ -187,7 +187,6 @@ int cmd_ps(int argc, char** argv)
...
@@ -187,7 +187,6 @@ int cmd_ps(int argc, char** argv)
return
0
;
return
0
;
}
}
FINSH_FUNCTION_EXPORT_ALIAS
(
cmd_ps
,
__cmd_ps
,
List
threads
in
the
system
.);
FINSH_FUNCTION_EXPORT_ALIAS
(
cmd_ps
,
__cmd_ps
,
List
threads
in
the
system
.);
FINSH_FUNCTION_EXPORT_ALIAS
(
cmd_ps
,
__cmd_i
,
List
threads
in
the
system
.);
int
cmd_time
(
int
argc
,
char
**
argv
)
int
cmd_time
(
int
argc
,
char
**
argv
)
{
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录