I am guilty of providing poor advice.
 
First:

On Saturday 19 May 2007 7:07 pm, Sirtaj Singh Kang wrote:
p]
> #define USB_ENDIAN_32(X) \
>
>       | ((((uint32)(X) & 0xff000000) >> 24) \
>       | (((uint32)(X) & 0x00ff0000) >> 8) \
>       | (((uint32)(X) & 0x0000ff00) << 8) \
>       | (((uint32)(X) & 0x000000ff) << 24))


#define USB_ENDIAN_32(X) \
      ((((uint32)(X) & 0xff000000) >24) \
      | (((uint32)(X) & 0x00ff0000) >8) \
      | (((uint32)(X) & 0x0000ff00) << 8) \
      | (((uint32)(X) & 0x000000ff) << 24))
 

Hopefully this is correct this time...

Second:

Of course you don't have to modify your char data array size if 3 bytes
is what you really want.

-Taj.



_______________________________________________
ilugd mailinglist -- [email protected]
http://frodo.hserus.net/mailman/listinfo/ilugd
Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi 
http://www.mail-archive.com/[email protected]/

Reply via email to