public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Ho Shui Choy Stanley  PS03B  NCS <scho@ncs.com.sg>
To: "Ecos-Discuss (E-mail)" <ecos-discuss@sources.redhat.com>
Subject: [ECOS] Serial Application
Date: Wed, 25 Apr 2001 03:07:00 -0000	[thread overview]
Message-ID: <19C34CD863B1D4118E2800508BAF663A0112F61A@STONE> (raw)

I modified the serial.c example to receive data from one serial port and
transmit it on the other.
I am not getting anything on the other port. I am using windows
hyperterminal to test the codes.

Below is the codes.

    err = cyg_io_lookup( "/dev/haldiag", &handle );

    if (ENOERR == err) {
        printf("Found /dev/haldiag. Writing string....\n");
        err = cyg_io_write( handle, test_string, &len );
    }
        
    if (ENOERR == err) {
        printf("I think I wrote the string. Did you see it?\n");
    }

    err = cyg_io_lookup( "/dev/ser1", &serial );

    if (ENOERR == err) {
        printf("Found /dev/ser1. Writing string....\n");
        err = cyg_io_write( serial, test_string, &len );
    }

    while (1) {
        buf_len = 1;
        cyg_io_read(serial, in_buffer, &buf_len);
        buf_len = 1;
        cyg_io_write(handle, in_buffer, &buf_len);
        buf_len = 2;
        cyg_io_write(handle, "\n\r", &buf_len);

    }

Thanks
Stanley

             reply	other threads:[~2001-04-25  3:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-25  3:07 Ho Shui Choy Stanley PS03B NCS [this message]
2001-04-25  9:15 ` Jonathan Larmour
2001-04-25 21:18 Ho Shui Choy Stanley PS03B NCS
2001-04-26 11:14 ` Jonathan Larmour
2001-04-26 18:23 Ho Shui Choy Stanley PS03B NCS
2001-04-27  3:12 ` Robert Cragie
2001-04-27  3:30 ` Carlos Camargo
2001-04-27  4:13   ` Robert Cragie
2001-05-07 23:04 [ECOS] Serial application Ho Shui Choy Stanley PS03B NCS
2001-05-07 23:52 Ho Shui Choy Stanley PS03B NCS
2001-05-08  6:30 ` Jonathan Larmour
2001-05-08  1:43 Ho Shui Choy Stanley PS03B NCS
2001-05-08 17:53 Ho Shui Choy Stanley PS03B NCS
2001-05-09 12:27 ` Jonathan Larmour
2001-05-09 17:54 Ho Shui Choy Stanley PS03B NCS
2001-05-09 19:33 ` Jonathan Larmour

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19C34CD863B1D4118E2800508BAF663A0112F61A@STONE \
    --to=scho@ncs.com.sg \
    --cc=ecos-discuss@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).