[ECOS] problem with termios: tcgetattr
Franck MAMALET FT-R&D DIH/OCF
franck.mamalet@rd.francetelecom.fr
Mon Jun 11 08:10:00 GMT 2001
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
ÃÂ
More information about the Ecos-discuss
mailing list