This is the mail archive of the ecos-discuss@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]

Re: non-standard serial baud rates


On Wed, Sep 12, 2001 at 05:18:06PM -0600, Trenton D. Adams wrote:

> Since I'm doing those SSI drivers for the EDB7XXX, I'm
> wondering.  Is specifing a non-standard baud rate going to make
> the API croke?

I wrote my driver to accept one of the enumeration values or a
plain baud rate (e.g. the integer value 19200). IMO, using
enumerated values for baud rates is an obsolete concept left
over from the days when an "int" wouldn't hold all legal baud
rate rates.

> What I really want to know, are the baud rates used by anything
> other than MY (tm) serial driver?

Not as far as I can tell.

> I ask because the eCos reference manual says "The field
> \"baud\" contains a baud rate selection.  This must be one of
> the values:" and it proceeds to display the
> CYGNUM_SERIAL_BAUD_XXXXXX macros.

My driver accepts any integer value. If the value is leass than
150, it is interpreted as an enumerated constant, if it's >=150,
then it is interpreted as a buad rate and I set the divistor
accordingly.  The resulting clock values values for some
arbitrary baud rates are not exact, but I don't see any reason
to stick with the enumeration scheme.

-- 
Grant Edwards
grante@visi.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]