AppleUHCIListElement.h [plain text]
#ifndef _IOKIT_AppleUHCIListElement_H
#define _IOKIT_AppleUHCIListElement_H
#include <libkern/c++/OSObject.h>
#include <IOKit/usb/IOUSBControllerListElement.h>
#include "AppleUSBUHCI.h"
#include "UHCI.h"
class AppleUHCIQueueHead : public IOUSBControllerListElement
{
OSDeclareDefaultStructors(AppleUHCIQueueHead)
private:
public:
static AppleUHCIQueueHead *WithSharedMemory(UHCIQueueHeadSharedPtr sharedLogical, IOPhysicalAddress sharedPhysical);
virtual void SetPhysicalLink(IOPhysicalAddress next);
virtual IOPhysicalAddress GetPhysicalLink(void);
virtual IOPhysicalAddress GetPhysicalAddrWithType(void);
virtual void print(int level);
UHCIQueueHeadSharedPtr GetSharedLogical(void);
UHCIAlignmentBuffer * GetAlignmentBuffer();
void ReleaseAlignmentBuffer(UHCIAlignmentBuffer*);
UInt16 functionNumber;
UInt16 endpointNumber;
UInt16 speed;
UInt16 maxPacketSize;
UInt16 pollingRate; UInt8 direction;
UInt8 type; bool stalled;
AppleUHCITransferDescriptor *firstTD; AppleUHCITransferDescriptor *lastTD;
queue_head_t freeBuffers;
queue_head_t allocatedBuffers; int buffersInUse;
};
#define kQHTypeDummy 0xDD
class AppleUHCITransferDescriptor : public IOUSBControllerListElement
{
OSDeclareDefaultStructors(AppleUHCITransferDescriptor)
private:
public:
static AppleUHCITransferDescriptor *WithSharedMemory(UHCITransferDescriptorSharedPtr sharedLogical, IOPhysicalAddress sharedPhysical);
virtual void SetPhysicalLink(IOPhysicalAddress next);
virtual IOPhysicalAddress GetPhysicalLink(void);
virtual IOPhysicalAddress GetPhysicalAddrWithType(void);
virtual void print(int level);
UHCITransferDescriptorSharedPtr GetSharedLogical(void);
struct UHCIAlignmentBuffer *buffer; IOUSBCommand *command; IOMemoryDescriptor *logicalBuffer;
AppleUHCIQueueHead *pQH; bool lastTDofTransaction;
UInt32 lastFrame; UInt32 lastRemaining; UInt16 direction;
};
class AppleUHCIIsochTransferDescriptor : public IOUSBControllerIsochListElement
{
OSDeclareDefaultStructors(AppleUHCIIsochTransferDescriptor)
public:
static AppleUHCIIsochTransferDescriptor *WithSharedMemory(UHCITransferDescriptorSharedPtr sharedLogical, IOPhysicalAddress sharedPhysical);
virtual void SetPhysicalLink(IOPhysicalAddress next);
virtual IOPhysicalAddress GetPhysicalLink(void);
virtual IOPhysicalAddress GetPhysicalAddrWithType(void);
virtual IOReturn UpdateFrameList(AbsoluteTime timeStamp);
virtual IOReturn Deallocate(IOUSBControllerV2 *uim);
virtual void print(int level);
UHCITransferDescriptorSharedPtr GetSharedLogical(void);
struct UHCIAlignmentBuffer *buffer; IOMemoryDescriptor *pBuffer;
bool lowLatency; IOReturn frStatus;
};
class AppleUHCIIsochEndpoint : public IOUSBControllerIsochEndpoint
{
OSDeclareDefaultStructors(AppleUHCIIsochEndpoint)
public:
virtual bool init();
UHCIAlignmentBuffer * GetAlignmentBuffer();
void ReleaseAlignmentBuffer(UHCIAlignmentBuffer*);
queue_head_t freeBuffers;
queue_head_t allocatedBuffers; int buffersInUse;
};
#endif