Changes to the module loader to handle specific errors from modules
[tpg/acess2.git] / Modules / USB / usb.c
index 99f905f..934136a 100644 (file)
@@ -3,7 +3,7 @@
  * USB Packet Control
  */
 #define DEBUG  1
-#include <common.h>
+#include <acess.h>
 #include <vfs.h>
 #include <drv_pci.h>
 #include "usb.h"
@@ -15,7 +15,19 @@ void USB_MakeToken(void *Buf, int PID, int Addr, int EndP)
        Uint8   *tok = Buf;
         int    crc = 0;        //USB_TokenCRC();
        
-       tok[0] = PID;
-       tok[1] = Addr | ((EndP&1)<<7);
-       tok[2] = (EndP >> 1) | crc;
+       tok[0] = PID & 0xFF;
+       tok[1] = (Addr & 0x7F) | ((EndP&1)<<7);
+       tok[2] = ((EndP >> 1) & 0x7) | crc;
 }
+
+#if 0
+void USB_SendPacket(int Controller, int PID, int Dev, int Endpoint, void *Data, int Length)
+{
+       uint8_t buf[Length/*+??*/];
+       switch(Controller & 0xF00)
+       {
+       case 1:
+               UHCI_SendPacket(Controller & 0xFF);
+       }
+}
+#endif

UCC git Repository :: git.ucc.asn.au