public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] SERIAL NON-BLOCKING mode in HW independent layer?
@ 2001-09-13  9:25 Trenton D. Adams
  2001-09-14 10:41 ` Jonathan Larmour
  0 siblings, 1 reply; 2+ messages in thread
From: Trenton D. Adams @ 2001-09-13  9:25 UTC (permalink / raw)
  To: eCos Discussion

I assume non-blocking mode for serial device drivers is entirely handled
by the hardware independent layer right?  I'm not quite sure about this
yet since it appears that cyg_io_read () and cyg_io_write () simply call
the function I provided in the function structure.  

However, there appears to be serial_XXX functions which do handle this.
One of the serial tests uses cyg_io_read () and cyg_io_write () directly
though.  I would think this would not allow non-blocking mode!

Where do I find information on what the proper way of accessing a serial
device is?  eg. cyg_io_xxx () or serial_xxx ()?  I've seen some posts
saying that serial_read () and serial_write () are used, but I want some
actual docs on it.

The eCos reference manual doesn't appear to talk about how to actually
access the serial devices other than through cyg_io_read () and
cyg_io_write ().

Trenton D. Adams
Extreme Engineering
#17, 6025 - 12 St. SE
Calgary, Alberta, Canada
T2H 2K1

Phone: 403 640 9494 ext-208
Fax: 403 640 9599

http://www.extremeeng.com

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

* Re: [ECOS] SERIAL NON-BLOCKING mode in HW independent layer?
  2001-09-13  9:25 [ECOS] SERIAL NON-BLOCKING mode in HW independent layer? Trenton D. Adams
@ 2001-09-14 10:41 ` Jonathan Larmour
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Larmour @ 2001-09-14 10:41 UTC (permalink / raw)
  To: Trenton D. Adams; +Cc: eCos Discussion

"Trenton D. Adams" wrote:
> 
> I assume non-blocking mode for serial device drivers is entirely handled
> by the hardware independent layer right?  I'm not quite sure about this
> yet since it appears that cyg_io_read () and cyg_io_write () simply call
> the function I provided in the function structure.

Not the io/common layer which purely provides an encompassing API, but nor
is it the hardware - it's the bit in the middle, like the io/serial/ layer
that does it.

> However, there appears to be serial_XXX functions which do handle this.
> One of the serial tests uses cyg_io_read () and cyg_io_write () directly
> though.  I would think this would not allow non-blocking mode!
> 
> Where do I find information on what the proper way of accessing a serial
> device is?  eg. cyg_io_xxx () or serial_xxx ()?  I've seen some posts
> saying that serial_read () and serial_write () are used, but I want some
> actual docs on it.
> 
> The eCos reference manual doesn't appear to talk about how to actually
> access the serial devices other than through cyg_io_read () and
> cyg_io_write ().

That's the only official external API, and that's what you should use. When
you set non-blocking mode it makes cyg_io_read() and cyg_io_write() be
non-blocking when referring to those devices.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

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

end of thread, other threads:[~2001-09-14 10:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-13  9:25 [ECOS] SERIAL NON-BLOCKING mode in HW independent layer? Trenton D. Adams
2001-09-14 10:41 ` 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).