X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=ppcskel.git;a=blobdiff_plain;f=usb%2Fhost%2Fohci.c;h=ed71c40250dedda7a83fbc7ff34a92e41c81df24;hp=5e50dba4af1f6fcab081da764ef7c7a6176310c9;hb=05b758504d4d87cdba9d14c52c06b3be6347bf4d;hpb=7bf08f09fa8cc0f49bcbfe6a830c472c96073550 diff --git a/usb/host/ohci.c b/usb/host/ohci.c index 5e50dba..ed71c40 100644 --- a/usb/host/ohci.c +++ b/usb/host/ohci.c @@ -18,6 +18,14 @@ Copyright (C) 2009 Sebastian Falbesoner #include "host.h" #include "../usbspec/usb11spec.h" +// macro for accessing u32 variables that need to be in little endian byte order; +// whenever you read or write from an u32 field that the ohci host controller +// will read or write from too, use this macro for access! +#define ACCESS_LE(dword) ( ((dword & 0xFF000000) >> 24) | \ + ((dword & 0x00FF0000) >> 8) | \ + ((dword & 0x0000FF00) << 8) | \ + ((dword & 0x000000FF) << 24) ) + static struct ohci_hcca hcca_oh0; static struct endpoint_descriptor *allocate_endpoint()