#include <usb_core.h>
#include <usb_hub.h>
#include <usb_host.h>
+#include "usb_proto.h"
+typedef struct sUSBHubPort tUSBHubPort;
typedef struct sUSBHost tUSBHost;
typedef struct sUSBDevice tUSBDevice;
typedef struct sUSBEndpoint tUSBEndpoint;
// === STRUCTURES ===
+struct sUSBHubPort
+{
+ void *ListNext;
+ char Status;
+ char PortNum;
+ tUSBDevice *Dev;
+};
+
/**
* \brief USB Hub data
*/
tUSBInterface *Interface;
int nPorts;
- tUSBDevice *Devices[];
+ struct sUSBHubPort Ports[];
};
struct sUSBEndpoint
tUSBInterface *Interface;
int EndpointIdx; // Interface endpoint index
int EndpointNum; // Device endpoint num
+ void *EndpointHandle;
int PollingPeriod; // In 1ms intervals
int MaxPacketSize; // In bytes
tUSBDriver *Driver;
void *Data;
+
+ struct sDescriptor_Interface IfaceDesc;
int nEndpoints;
tUSBEndpoint Endpoints[];
tUSBHost *Host;
int Address;
+ void *EndpointHandles[16];
+
+ struct sDescriptor_Device DevDesc;
+
int nInterfaces;
tUSBInterface *Interfaces[];
};
Uint8 AddressBitmap[128/8];
- tUSBDevice RootHubDev;
- tUSBInterface RootHubIf;
+ tUSBDevice *RootHubDev;
+ tUSBInterface *RootHubIf;
tUSBHub RootHub;
};