summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorwuyangyong <[email protected]>2011-12-15 13:21:34 +0000
committerwuyangyong <[email protected]>2011-12-15 13:21:34 +0000
commit44b3b3ad87733ec82c0e2af64faa3882c6fe6f9a (patch)
tree1677816ae4ca160206427c6ca0053239ca190402 /components
parentdb82f30dc2a2f5475bc45bffa149e016484ff074 (diff)
Add more device type.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1838 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components')
-rw-r--r--components/finsh/cmd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/components/finsh/cmd.c b/components/finsh/cmd.c
index 64fc0ad46f..500a24ffa7 100644
--- a/components/finsh/cmd.c
+++ b/components/finsh/cmd.c
@@ -357,6 +357,9 @@ static long _list_device(struct rt_list_node *list)
"I2C Device",
"USB Slave Device",
"USB Host Bus",
+ "SPI Bus",
+ "SPI Device",
+ "SDIO Bus",
"Unknown"
};
@@ -365,7 +368,8 @@ static long _list_device(struct rt_list_node *list)
for (node = list->next; node != list; node = node->next)
{
device = (struct rt_device*)(rt_list_entry(node, struct rt_object, list));
- rt_kprintf("%-8s %-8s \n", device->parent.name, device_type_str[device->type]);
+ rt_kprintf("%-8s %-8s \n", device->parent.name,
+ (device->type <= RT_Device_Class_Unknown)?device_type_str[device->type]:device_type_str[RT_Device_Class_Unknown]);
}
return 0;