cs8900a for big endian targets
Jonathan Larmour
jifl@eCosCentric.com
Mon Mar 3 21:10:00 GMT 2003
Bob Koninckx wrote:
> Oops ... Better send it with the attachment ...
>
> Attached patch makes a number of modifications to the code to support
> both big endian and little endian targets. Thoroughly tested with big
> endian target (powerpc), not been tested with a little endian target as
> I don't have one.
Just a comment, that to save duplication (and therefore avoid the risk of
being out of sync) it might be slightly preferable to use a macro with the
existing values.
Perhaps #include <cyg/hal/hal_endian.h> and "just" use CYG_CPU_TO_LE16
when using/defining each value? That might be sufficient.
Similarly using the CYG_*_TO_* macros from hal_endian.h you don't need to
use CYG_SWAP16 etc. but can just use a single macro which will be a no-op
on little-endian.
Jifl
--
eCosCentric http://www.eCosCentric.com/ The eCos and RedBoot experts
--[ "You can complain because roses have thorns, or you ]--
--[ can rejoice because thorns have roses." -Lincoln ]-- Opinions==mine
More information about the Ecos-patches
mailing list