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: Mon, 07 May 2001 23:04:00 -0000 [thread overview]
Message-ID: <19C34CD863B1D4118E2800508BAF663A0112F627@STONE> (raw)
I wrote a test program to test the serial port on my platform (AT91EB40).
This program simply transfer data received from one port to the other. I
have two threads, each will monitor one serial port. Below is the codes.
Thread 1:
static void simple_prog1(CYG_ADDRESS data)
{
cyg_uint32 buf_len;
cyg_uint8 in_buffer[10];
while (1) {
buf_len = 1;
cyg_io_read(serial1, in_buffer, &buf_len);
buf_len = 1;
cyg_io_write(serial0, in_buffer, &buf_len);
}
}
Thread 2:
static void simple_prog2(CYG_ADDRESS data)
{
cyg_uint32 buf_len;
cyg_uint8 in_buffer[10];
while (1) {
buf_len = 1;
cyg_io_read(serial0, in_buffer, &buf_len);
buf_len = 1;
cyg_io_write(serial1, in_buffer, &buf_len);
}
}
When I start the program, it just run for a few seconds then stops. Can
anyone tell me what's wrong?
Thanks
Stanley
> ____________________________
> This email (including all attachments) contains confidential information
> which may be privileged. It is intended solely for the identified
> recipient(s) to whom it is addressed. If you are not an intended
> recipient, please reply to us immediately and delete this message from
> your system. You may not copy or use it for any purpose, or otherwise
> disclose its contents to any person.
>
next reply other threads:[~2001-05-07 23:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-07 23:04 Ho Shui Choy Stanley PS03B NCS [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-05-09 17:54 Ho Shui Choy Stanley PS03B NCS
2001-05-09 19:33 ` Jonathan Larmour
2001-05-08 17:53 Ho Shui Choy Stanley PS03B NCS
2001-05-09 12:27 ` Jonathan Larmour
2001-05-08 1:43 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-04-26 18:23 [ECOS] Serial Application 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-04-25 21:18 Ho Shui Choy Stanley PS03B NCS
2001-04-26 11:14 ` Jonathan Larmour
2001-04-25 3:07 Ho Shui Choy Stanley PS03B NCS
2001-04-25 9:15 ` 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=19C34CD863B1D4118E2800508BAF663A0112F627@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).