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"<j...@rtems.org>;
????????: 2019??3??20??(??????) ????7:48
??????: "787562067"<googch...@qq.com>;
????: "rtems-us...@rtems.org"<users@rtems.org>; 
????: Re: usart read variable string





On Wed, Mar 20, 2019, 4:48 AM 787562067 <googch...@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@rtems.org
 http://lists.rtems.org/mailman/listinfo/users

Attachment: init.c
Description: Binary data

_______________________________________________
users mailing list
users@rtems.org
http://lists.rtems.org/mailman/listinfo/users

Reply via email to