[ECOS] read com0 on e7t

F.T.Nilsson@hw.ac.uk F.T.Nilsson@hw.ac.uk
Fri May 16 12:18:00 GMT 2003


I have an application which reads on com0 on e7t and eventhoughthe message 
is a bit strang it works. However I want to poll com0 until a message is 
sent so I put the cyg_io_read(..) in a loop but the program hangs when 
entering this function (due to the loop).

can anyone help me?



static void poll_com0(CYG_ADDRESS data)//
   Cyg_ErrNo err;
   printf("in poll_com0");
    char mybuff[100];
    cyg_uint32 len2 = strlen(mybuff);	
while(len2 == 0)
    err= cyg_io_read(handle_ser0, mybuff , &len2 );
    len2 = strlen(mybuff);
  if (ENOERR == err) {
    printf(" read on ser0\n");
    printf("Mybyff = %s\n", mybuff[0]);



This e-mail and any files transmitted with it are confidential
and intended solely for the use of the individual or entity to
whom it is addressed.  If you are not the intended recipient
you are prohibited from using any of the information contained
in this e-mail.  In such a case, please destroy all copies in
your possession and notify the sender by reply e-mail.  Heriot
Watt University does not accept liability or responsibility
for changes made to this e-mail after it was sent, or for
viruses transmitted through this e-mail.  Opinions, comments,
conclusions and other information in this e-mail that do not
relate to the official business of Heriot Watt University are
not endorsed by it.

Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

More information about the Ecos-discuss mailing list