Author: gkruse Date: 2006-08-30 19:09:05 +0200 (Wed, 30 Aug 2006) New Revision: 177 Modified: branches/usb-drivers/Sources/Driver/USBJack/rt2570.h Log: Nailed down the last bug in asic init. Looks like I'm going to have to add endian defines to all the freaking unions in this file. WTF. See http://developer.apple.com/documentation/MacOSX/Conceptual/universal_binary/universal_binary_diffs/chapter_3_section_12.html for a description of what I'm talking about. Modified: branches/usb-drivers/Sources/Driver/USBJack/rt2570.h =================================================================== --- branches/usb-drivers/Sources/Driver/USBJack/rt2570.h 2006-08-29 02:05:05 UTC (rev 176) +++ branches/usb-drivers/Sources/Driver/USBJack/rt2570.h 2006-08-30 17:09:05 UTC (rev 177) @@ -951,9 +951,15 @@ typedef union _PHY_CSR7_STRUC { struct { - USHORT Data:8; // BBP data - USHORT RegID:7; // BBP register ID - USHORT WriteControl:1; // 1: Write, 0: Read + #if __BIG_ENDIAN__ + USHORT WriteControl:1; // 1: Write, 0: Read + USHORT RegID:7; // BBP register ID + USHORT Data:8; // BBP data + #else + USHORT Data:8; // BBP data + USHORT RegID:7; // BBP register ID + USHORT WriteControl:1; // 1: Write, 0: Read + #endif } field; USHORT value; } PHY_CSR7_STRUC, *PPHY_CSR7_STRUC;