This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Laurent GONZALEZ wrote:
This cannot be avoided. The driver must be able to respond to any single character received, because an application might want to receive characters sent one by one.
And that is the major point. Carefully reading the at91 manual, it is to notice that at91 provide a powerfull timeout mechanism, to raise an interrupt if the line is idle after the last receive character. Using this, the driver will respond to a single char under ligth load, and will use full buffering capability under heavy load.
But that would result in arbitrary delays that are visible to the application. You would need to pick some delay value at random, or make it a configuration parameter. I find this undesirable; it is not the driver's business to enforce this kind of policy decision upon the application. If it needs to transfer data at a rate that significantly loads the CPU in order to serve its purpose (maybe in bursts only), than it must be able to do so.
Just my 2 (Euro) cents here (disclaimer: I've never worked with the AT91 before, so my opinion may be entirely worthless).
(*) I say 'normally' because I realise that some applications might need to determine the exact time a byte was received, for instance to satisfy some form of time triggered communication protocoll. However. I would argue that such an application should probably not be using a generic serial driver. -- -------------------------------------------------------------------- | Eric Doenges | DynaPel Laboratories GmbH | | Tel: +49 89 962428 23 | Fraunhoferstrasse 9/2 | | Fax: +49 89 962428 90 | D - 85737 Ismaning, Germany | --------------------------------------------------------------------
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |