summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorArcherChang <[email protected]>2017-08-25 10:25:33 +0800
committerArcherChang <[email protected]>2017-08-25 10:25:33 +0800
commit921fbfbc219f48c77d8b4296d6038bf04a8ff53b (patch)
treee2dc731ff69e67c6706afb8eae54cd77b8f989fb /components
parent27c7ed3501c31da4140c53c84685b372a515ae77 (diff)
[1] 添加Andes N1068体系;
[2] 基于AE210P EVB板; [3] 详细信息参阅bsp/AE210P/readme文件夹; 《Andes工程创建和调试》文档;等。
Diffstat (limited to 'components')
-rw-r--r--components/finsh/finsh.h4
-rw-r--r--components/finsh/shell.c13
2 files changed, 11 insertions, 6 deletions
diff --git a/components/finsh/finsh.h b/components/finsh/finsh.h
index e80eaab178..68a37f2da5 100644
--- a/components/finsh/finsh.h
+++ b/components/finsh/finsh.h
@@ -72,7 +72,9 @@ typedef unsigned long u_long;
/* only for GNU GCC */
#if !(defined(__GNUC__) && defined(__x86_64__))
-typedef unsigned int size_t;
+//typedef unsigned int size_t;
+#include <stddef.h>
+#include <string.h>
#else
#include <stdio.h>
#endif
diff --git a/components/finsh/shell.c b/components/finsh/shell.c
index ae0934f5d1..434b2a0952 100644
--- a/components/finsh/shell.c
+++ b/components/finsh/shell.c
@@ -311,10 +311,11 @@ void finsh_thread_entry(void *parameter)
if (shell->device == RT_NULL)
{
#ifdef RT_USING_CONSOLE
- shell->device = rt_console_get_device();
- RT_ASSERT(shell->device);
- rt_device_set_rx_indicate(shell->device, finsh_rx_ind);
- rt_device_open(shell->device, (RT_DEVICE_OFLAG_RDWR | RT_DEVICE_FLAG_STREAM | RT_DEVICE_FLAG_INT_RX));
+ shell->device = rt_console_get_device();
+ RT_ASSERT(shell->device);
+// rt_device_set_rx_indicate(shell->device, finsh_rx_ind);
+// rt_device_open(shell->device, (RT_DEVICE_OFLAG_RDWR | RT_DEVICE_FLAG_STREAM | RT_DEVICE_FLAG_INT_RX));
+ rt_device_open(shell->device, (RT_DEVICE_OFLAG_RDWR | RT_DEVICE_FLAG_STREAM));
#else
RT_ASSERT(shell->device);
#endif
@@ -323,7 +324,7 @@ void finsh_thread_entry(void *parameter)
while (1)
{
/* wait receive */
- if (rt_sem_take(&shell->rx_sem, RT_WAITING_FOREVER) != RT_EOK) continue;
+// if (rt_sem_take(&shell->rx_sem, RT_WAITING_FOREVER) != RT_EOK) continue;
/* read one character from device */
while (rt_device_read(shell->device, 0, &ch, 1) == 1)
@@ -550,6 +551,8 @@ void finsh_thread_entry(void *parameter)
shell->line_curpos = 0;
}
} /* end of device read */
+
+ rt_thread_delay(1);
}
}