mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-02-21 01:47:09 +08:00
[1] Andes N1068体系移植
a. 恢复对finsh.h和shell.c的修改;(若需要在Andes AE210P里使用Finsh,请参照bsp/AE210P/readme/readme做修改)
This commit is contained in:
parent
8923247fb3
commit
9bbf538753
@ -72,9 +72,7 @@ typedef unsigned long u_long;
|
|||||||
/* only for GNU GCC */
|
/* only for GNU GCC */
|
||||||
|
|
||||||
#if !(defined(__GNUC__) && defined(__x86_64__))
|
#if !(defined(__GNUC__) && defined(__x86_64__))
|
||||||
//typedef unsigned int size_t;
|
typedef unsigned int size_t;
|
||||||
#include <stddef.h>
|
|
||||||
#include <string.h>
|
|
||||||
#else
|
#else
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -311,11 +311,10 @@ void finsh_thread_entry(void *parameter)
|
|||||||
if (shell->device == RT_NULL)
|
if (shell->device == RT_NULL)
|
||||||
{
|
{
|
||||||
#ifdef RT_USING_CONSOLE
|
#ifdef RT_USING_CONSOLE
|
||||||
shell->device = rt_console_get_device();
|
shell->device = rt_console_get_device();
|
||||||
RT_ASSERT(shell->device);
|
RT_ASSERT(shell->device);
|
||||||
// rt_device_set_rx_indicate(shell->device, finsh_rx_ind);
|
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 | RT_DEVICE_FLAG_INT_RX));
|
||||||
rt_device_open(shell->device, (RT_DEVICE_OFLAG_RDWR | RT_DEVICE_FLAG_STREAM));
|
|
||||||
#else
|
#else
|
||||||
RT_ASSERT(shell->device);
|
RT_ASSERT(shell->device);
|
||||||
#endif
|
#endif
|
||||||
@ -324,7 +323,7 @@ void finsh_thread_entry(void *parameter)
|
|||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
/* wait receive */
|
/* 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 */
|
/* read one character from device */
|
||||||
while (rt_device_read(shell->device, 0, &ch, 1) == 1)
|
while (rt_device_read(shell->device, 0, &ch, 1) == 1)
|
||||||
@ -551,8 +550,6 @@ void finsh_thread_entry(void *parameter)
|
|||||||
shell->line_curpos = 0;
|
shell->line_curpos = 0;
|
||||||
}
|
}
|
||||||
} /* end of device read */
|
} /* end of device read */
|
||||||
|
|
||||||
rt_thread_delay(1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user