回复: usart read variable string
787562067
googcheng at qq.com
Thu Mar 21 07:12:29 UTC 2019
I have tried to code it as the attached file, but it does not work well, read return only one char when i input a string from PC serial port tool
at the same time, testcom1 function also is called more than one time, i dont know why
RTEMS4.11.3 on stm32f407
//below is the log
[15:01:32.168]收←◆*** Simple COM1 Test ***
Opened COM1, fd=3
fcntl=0
Hello, I'm waiting for input..
\0
[15:01:33.022]收←◆*** Simple COM1 Test ***
Opened COM1, fd=3
fcntl=0
Hello, I'm waiting for input..
\0
[15:01:34.322]收←◆*** Simple COM1 Test ***
Opened COM1, fd=3
fcntl=0
Hello, I'm waiting for input..
\0
[15:01:35.659]收←◆*** Simple COM1 Test ***
Opened COM1, fd=3
fcntl=0
Hello, I'm waiting for input..
\0
[15:01:43.622]发→◇abcdefg
□
------------------ 原始邮件 ------------------
发件人: "Joel Sherrill"<joel at rtems.org>;
发送时间: 2019年3月20日(星期三) 晚上7:48
收件人: "787562067"<googcheng at qq.com>;
抄送: "rtems-users at rtems.org"<users at rtems.org>;
主题: Re: usart read variable string
On Wed, Mar 20, 2019, 4:48 AM 787562067 <googcheng at qq.com> wrote:
Hi all
I want to read usart variable string, but only find an API int usart_read_polled(int minor)
is there a simple method to do this like using the idle interrupt
Normally applications do not use device specific methods. They use either the normal POSIX methods like read() with termios for settings or the printk() family of methods.
Under the hood, the implementation will either be interrupt driven or polled at each clock tick.
_______________________________________________
users mailing list
users at rtems.org
http://lists.rtems.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20190321/af5f7240/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: init.c
Type: application/octet-stream
Size: 3988 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20190321/af5f7240/attachment-0002.obj>
More information about the users
mailing list