From: Daniel.Andersson@combitechsystems.com
To: ecos-discuss@sourceware.cygnus.com
Subject: [ECOS] Serial problem on EB40
Date: Wed, 11 Jul 2001 00:01:00 -0000 [thread overview]
Message-ID: <2253171AF143D21185A60000F8FA748B02DA4E33@pluto.combitech.se> (raw)
Hi,
I have a quite strange problem with my serial port (using a EB40 board). I
can get a handle to the port using the lookup function but when i am trying
to make any calls to it (like cyg_io_set_config) then i get a -EDEVNOSUPP in
return (see clip below). It looks like the serial port isn't setup right in
the DEVTAB since the functioncall "t->handlers->set_config" in iosys.c
doesn't work. Any clues of what the problem maigt be?
Regards, Daniel
---clip from iosys.c----
273 if (!t->handlers->set_config) {
274 return -EDEVNOSUPP;
275 }
---end clip from iosys.c----
-----clip-----
//Find device
err = cyg_io_lookup("/dev/ser0",&serial_handle );
if (ENOERR != err) {
serial_handle = 0; //ERROR
}
//Set up device
//ser_info.baud = CYGNUM_SERIAL_BAUD_9600;
ser_info.baud = CYGNUM_SERIAL_BAUD_38400;
ser_info.stop = CYGNUM_SERIAL_STOP_1;
ser_info.parity = CYGNUM_SERIAL_PARITY_EVEN;
ser_info.word_length = CYGNUM_SERIAL_WORD_LENGTH_8;
ser_info.flags = CYG_SERIAL_FLAGS_DEFAULT;
config_len = sizeof(ser_info);
err = cyg_io_set_config(serial_handle,
CYG_IO_SET_CONFIG_SERIAL_INFO,
&ser_info,
&config_len);
if (ENOERR != err) {
serial_handle = 0; //ERROR
}
//TBD Until new OS arrives in a couple of days DBO 010629
HAL_WRITE_UINT32(0xfffd0000, 0x50);
config_len = sizeof(cyg_uint32);
//No blocking when read
blocking_val = 0;
err = cyg_io_set_config(serial_handle,
CYG_IO_SET_CONFIG_SERIAL_READ_BLOCKING,
&blocking_val,
&config_len);
if (ENOERR != err) {
serial_handle = 0; //ERROR
}
// Blocking when write
blocking_val = 1;
err = cyg_io_set_config(serial_handle,
CYG_IO_SET_CONFIG_SERIAL_WRITE_BLOCKING,
&blocking_val,
&config_len);
if (ENOERR != err) {
serial_handle = 0; //ERROR
}
----clip end----
next reply other threads:[~2001-07-11 0:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-11 0:01 Daniel.Andersson [this message]
2001-07-11 0:17 ` [ECOS] MLT structure files SEBASTIEN ANDRE
2001-07-11 10:57 ` Jonathan Larmour
2001-07-11 0:21 ` [ECOS] Serial problem on EB40 Jesper Skov
2001-07-11 1:00 Daniel.Andersson
2001-07-11 1:41 ` Jesper Skov
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=2253171AF143D21185A60000F8FA748B02DA4E33@pluto.combitech.se \
--to=daniel.andersson@combitechsystems.com \
--cc=ecos-discuss@sourceware.cygnus.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).