This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
Re: i2c interface polled/IT driven transfer
Personally I'm not sure there's a need. The driver can automatically adapt
between polled and interrupt-driven mode with a test of whether global
interrupts are enabled or not. If only one or other mode is desired than
per-driver CDL can eliminate unwanted code. This is what I've done in some
of my own (non-public) drivers.
It seems better to me for the decision between polled vs interrupt driven
not to have to be explicitly chosen by higher level code, particularly
since that higher layer code may itself be generic (not part of the
application) and be even less aware of global interrupt state.
OK, checking global interrupt is OK for me, if you think. At least, docu
writing can be skipped :)
Peter