public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] device driver interface
@ 2002-04-12  2:38 Koeller, T.
  2002-04-30 10:23 ` Jonathan Larmour
  0 siblings, 1 reply; 2+ messages in thread
From: Koeller, T. @ 2002-04-12  2:38 UTC (permalink / raw)
  To: ecos-discuss (E-Mail)

Hi all,

what would be the recommended way of coding a device driver that does
not fit the rather rudimentary and rigid read/write/set_config/get_config
model
as described by the documentation? If, for example, I wanted asynchronous
notifications upon certain driver-detected events, such as data arriving, is
there a standard way of coding this, or do I have to use sychronization
primitives directly, extending the I/O API in a nonstandard way? Is there
something similar to an ioctl API, allowing for more generalized I/O
operations
that require additional parameters beyond just a buffer and a byte count?
Can I attach context information to I/O requests that can be retrieved
after the operation is finished?

Any advice greatly appreciated!

Thomas
----------------------------------------------- 
Thomas Koeller, Software Development 

Basler Vision Technologies 
An der Strusbek 60-62 
22926 Ahrensburg 
Germany 

Tel +49 (4102) 463-390 
Fax +49 (4102) 463-46390

mailto:Thomas.Koeller@baslerweb.com 
http://www.baslerweb.com 


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

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

* Re: [ECOS] device driver interface
  2002-04-12  2:38 [ECOS] device driver interface Koeller, T.
@ 2002-04-30 10:23 ` Jonathan Larmour
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Larmour @ 2002-04-30 10:23 UTC (permalink / raw)
  To: Koeller, T.; +Cc: ecos-discuss (E-Mail)

"Koeller, T." wrote:
> 
> Hi all,
> 
> what would be the recommended way of coding a device driver that does
> not fit the rather rudimentary and rigid read/write/set_config/get_config
> model
> as described by the documentation? If, for example, I wanted asynchronous
> notifications upon certain driver-detected events, such as data arriving, is
> there a standard way of coding this, or do I have to use sychronization
> primitives directly, extending the I/O API in a nonstandard way? Is there
> something similar to an ioctl API, allowing for more generalized I/O
> operations
> that require additional parameters beyond just a buffer and a byte count?

That's indeed something which set_config/get_config could theoretically do.

> Can I attach context information to I/O requests that can be retrieved
> after the operation is finished?

Not easily.

Remember the cyg_io_* functions are only there to provide a framework. If
your device isn't really able to support it, then just go ahead and provide
your own io/whatever package with its own API in a header file. If your
application has to have detailed knowledge about the driver it is using,
there's little point forcing the interface to be the "generic" API.

There's no point fitting a round peg in a square hole :-).

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
--[ "You can complain because roses have thorns, or you ]--
--[  can rejoice because thorns have roses." -Lincoln   ]-- Opinions==mine

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

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

end of thread, other threads:[~2002-04-30 17:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-12  2:38 [ECOS] device driver interface Koeller, T.
2002-04-30 10:23 ` 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).