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]

Re: cs8900a for big endian targets


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


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