public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] problem with termios: tcgetattr
@ 2001-06-11  8:10 Franck MAMALET FT-R&D DIH/OCF
  2001-06-11 13:05 ` Jonathan Larmour
  0 siblings, 1 reply; 8+ messages in thread
From: Franck MAMALET FT-R&D DIH/OCF @ 2001-06-11  8:10 UTC (permalink / raw)
  To: ecos-discuss

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1709 bytes --]

Hi,
I'm trying to port a Linux program,  on eCos and I have some trouble
with termios function:  tcgetattr.
This program is opening a serial driver with open('/dev/ser2",.....)
which seems to be OK.
To configure the terminal, it calls   tcgetattr(fd, &t),
but generates an error "tcgetattr wrong argument"
I had a look to functions called by tcgetattr :
tcgetattr (fildes=3, termios_p=0x4f738) at //e/ecos/REDHAT~1/eCos/packages/io/serial/current/src/common/termios.c:160
    calls
        ret = fp->f_ops->fo_getinfo(
fp, CYG_IO_GET_CONFIG_TERMIOS, termios_p,  len);
    which for a device is mapped to
        dev_fo_getinfo (fp=0x4d3e8,
key=1024, buf=0x4f738, len=40)
     and this function calls (devfs.cxx l452)
         err = cyg_io_get_config(
(cyg_io_handle_t)fp->f_data, key, buf, &ll );
     then this function calls   
(iosys.c l257)
        t->handlers->get_config(handle,
key, buf, len);
    which is mapped for a serial device to
        serial_get_config (handle=0x3f12c,
key=1024, xbuf=0x4f6fc, len=0x4f738)
It seems that the problem is about the "key", because serial_get_config
only tests CYG_IO_GET_CONFIG_SERIAL_xxx which differ from CYG_IO_GET_CONFIG_TERMIOS,
and so generates an error.
Could anyone help me in this regard.
Thanks in advance.
Regards
Franck.
PS: my configuration is eCos 1.3.1 on an EDB7212 platform.
 
 
 
 
 
 
-- 
& france telecom 
Mamalet Franck
FTR&D DIH/OCF
Tél  : 04 76 76 45 71   Fax : 04 76 90 34 43
franck.mamalet@rd.francetelecom.fr
 

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2001-06-19  3:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-11  8:10 [ECOS] problem with termios: tcgetattr Franck MAMALET FT-R&D DIH/OCF
2001-06-11 13:05 ` Jonathan Larmour
2001-06-13  2:57   ` Franck MAMALET FT-R&D DIH/OCF
2001-06-13  5:31     ` Jonathan Larmour
2001-06-18  7:23   ` [ECOS] How to use cyg_io_select Franck MAMALET FT-R&D DIH/OCF
2001-06-18 10:51     ` Jonathan Larmour
2001-06-19  1:28       ` Franck MAMALET FT-R&D DIH/OCF
2001-06-19  3:38         ` Jonathan Larmour

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).