/*
- * AcessOS Version 1
- * USB Stack
+ * Acess2 USB Stack
+ * - By John Hodge (thePowersGang)
+ *
+ * usb.h
+ * - USB Internal definitions
*/
#ifndef _USB_H_
#define _USB_H_
*/
struct sUSBHub
{
- tUSBDevice *Device;
-
- tUSB_HubPoll CheckPorts;
+ tUSBInterface *Interface;
int nPorts;
tUSBDevice *Devices[];
struct sUSBEndpoint
{
+ tUSBEndpoint *Next; // (usb_poll.c) Clock list
tUSBInterface *Interface;
- tUSBEndpoint *Next; // In the poll list
+ int EndpointIdx; // Interface endpoint index
+ int EndpointNum; // Device endpoint num
+
int PollingPeriod; // In 1ms intervals
int MaxPacketSize; // In bytes
-
- char Direction; // 1 Polled Input, 0 Output
+ Uint8 Type; // Same as sUSBDriver.Endpoints.Type
- Uint8 Type; // Same as sDescriptor_Endpoint.Type
+ int PollingAtoms; // (usb_poll.c) Period in clock list
+ void *InputData;
};
/**
*/
struct sUSBInterface
{
- tUSBInterface *Next;
+// tUSBInterface *Next;
tUSBDevice *Dev;
tUSBDriver *Driver;
Uint8 AddressBitmap[128/8];
tUSBDevice RootHubDev;
+ tUSBInterface RootHubIf;
tUSBHub RootHub;
};
-extern void USB_NewDevice(tUSBHub *Hub);
+extern tUSBDriver *USB_int_FindDriverByClass(Uint32 ClassCode);
#endif