You can make function for setting up DMA which will do all work (i.e. 
swapping bytes to right endian)...
   SetDMA (channel, src_addr, dst_addr, len, ...);
or have similar function which will write data from little-endian memory 
structure to DMA control structure:
   SetDMA (channel, &structure);

Hynek Sladky


ronnym...@aol.com wrote:
>   I am programming the TI CC1110 RF transceiver with an 8051 core using 
> SDCC 2.8.
> The chip has eight consecutive bytes that program an internal DMA 
> controller. For some reason, the bitfields for these eight bytes are 
> setup in reverse (Big Endian?).
> This puts me at a little disadvantage for loading values into the DMA 
> registers. My work around will be to either reverse the bytes as they 
> are assigned to the 8 byte structure, or... reverse the order of the 
> bytes in a dummy structure,load the data, then reverse the bits of the 
> entire structure as it is loaded into the assigned DMA registers. Has 
> anyone else run into this, and is there a better way?
> Thanks,
> Ron

------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to