为 10.11 升级 osx 驱动程序(USB 堆栈中的更改)

Upgrading osx driver for 10.11 (Changes in USB stack)

我正在将现有的自定义鼠标驱动程序设备升级到 OSX 10.11。可以看到苹果更新了它的usb stack。

请参考- https://developer.apple.com/library/mac/releasenotes/General/APIDiffsMacOSX10_11/Objective-C/Kernel.html

我现有的代码使用了许多已删除的 classes(IOUSBHIDDriverIOUSBInterfaceIOUSBPipe 等)。有人可以帮我找到替代品或任何有用的信息来升级到 10.11 吗?

很多classes和头文件都重命名了,我可以从上面的link中找出替换。但代码还使用了已弃用的 class IOUSBPipe 及其方法。我还没有完全理解它的用途。有人可以解释 IOUSBPipe 的目的并建议我 OSX 10.11 的替代方案 class 吗?

请在此行下方找到处理 IOUSBpipe

的代码片段
IOMemoryDescriptor *report;
setReport(report, kIOHIDReportTypeOutput);
IOReturn ret;
IOUSBDevRequest request;

IOUSBFindEndpointRequest findRequest = {
    kUSBAnyType,
    kUSBAnyDirn,
    0,
    0
};

IOUSBPipe *pipe = NULL;

while(pipe=usbInterface->FindNextPipe(pipe, &findRequest))
{
if (!pipe)
{
    IOLog("NO PIPE!\n");
    return 0;
}
IOLog("control request on pipe!\n");

request.bmRequestType = (UInt8)req->bmRequestType;
request.bRequest = (UInt8)req->bRequest;
request.wIndex = (UInt16)req->wIndex;
request.wLength = req->wLength;
request.wValue = (UInt16)req->wValue;
request.pData = (void*)data;

pipe->ControlRequest(&request);
    IOLog("result: %d", data[0]);
}

一个管道基本上代表一个USB端点的一个方向。您可以从中发送或接收数据。我不太了解 Mac OS X 中的内核级开发,但是通过查看您发布的 document,我怀疑您应该使用 IOUSBHostPipe 现在代替 IOUSBPipe。