Changes to the module loader to handle specific errors from modules
[tpg/acess2.git] / Modules / USB / usb.c
1 /*
2  * Acess 2 USB Stack
3  * USB Packet Control
4  */
5 #define DEBUG   1
6 #include <acess.h>
7 #include <vfs.h>
8 #include <drv_pci.h>
9 #include "usb.h"
10
11
12 // === CODE ===
13 void USB_MakeToken(void *Buf, int PID, int Addr, int EndP)
14 {
15         Uint8   *tok = Buf;
16          int    crc = 0;        //USB_TokenCRC();
17         
18         tok[0] = PID & 0xFF;
19         tok[1] = (Addr & 0x7F) | ((EndP&1)<<7);
20         tok[2] = ((EndP >> 1) & 0x7) | crc;
21 }
22
23 #if 0
24 void USB_SendPacket(int Controller, int PID, int Dev, int Endpoint, void *Data, int Length)
25 {
26         uint8_t buf[Length/*+??*/];
27         switch(Controller & 0xF00)
28         {
29         case 1:
30                 UHCI_SendPacket(Controller & 0xFF);
31         }
32 }
33 #endif

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