This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: eCos cyg/io/devtab.h typos?
- To: "Trenton D. Adams" <tadams at extremeeng dot com>
- Subject: Re: [ECOS] eCos cyg/io/devtab.h typos?
- From: Jonathan Larmour <jlarmour at redhat dot com>
- Date: Tue, 12 Jun 2001 19:04:45 +0100
- Cc: 'eCos' <ecos-discuss at sources dot redhat dot com>
- Organization: Red Hat UK Ltd.
- References: <000201c0f35b$d8310a80$090110ac@BURN>
"Trenton D. Adams" wrote:
>
> I'm looking at the code below from the devtab.h file starting around
> line 113. Shouldn't the cyg_devio_bwrite and cyg_devio_bread be
> switched between the two macros? I mean doesn't cyg_devio_bwrite and
> cyg_devio_bread stand for block write/read respectively, and not
> character write/read respectively? If so, what are the block read/write
> doing in a char table and visaversa in the block table?
A cyg_devio_table_t includes methods for both block and character reads.
The way the initializer is done below, a default function is provided when
not supported (see io/common/current/src/iosys.c). So for a
CHAR_DEVIO_TABLE, we use the default block read/write functions, which
return -EDEVNOSUPP.
Jifl
> #define
> CHAR_DEVIO_TABLE(_l,_write,_read,_select,_get_config,_set_config) \
> cyg_devio_table_t _l = { \
> _write, \
> _read, \
> cyg_devio_bwrite, \
> cyg_devio_bread, \
> _select, \
> _get_config, \
> _set_config, \
> };
>
> #define
> BLOCK_DEVIO_TABLE(_l,_bwrite,_bread,_select,_get_config,_set_config)
> \
> cyg_devio_table_t _l = { \
> cyg_devio_cwrite, \
> cyg_devio_cread, \
> _bwrite, \
> _bread, \
> _select, \
> _get_config, \
> _set_config, \
> };
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
Come to the Red Hat TechWorld open source conference in Brussels!
Keynotes, techie talks and exhibitions http://www.redhat-techworld.com/