MCPcopy Create free account
hub / github.com/360Controller/360Controller / newReportDescriptor

Method newReportDescriptor

360Controller/Controller.cpp:73–81  ·  view source on GitHub ↗

Returns the HID descriptor for this device

Source from the content-addressed store, hash-verified

71
72// Returns the HID descriptor for this device
73IOReturn Xbox360ControllerClass::newReportDescriptor(IOMemoryDescriptor **descriptor) const
74{
75 IOBufferMemoryDescriptor *buffer = IOBufferMemoryDescriptor::inTaskWithOptions(kernel_task,0,sizeof(HID_360::ReportDescriptor));
76
77 if (buffer == NULL) return kIOReturnNoResources;
78 buffer->writeBytes(0,HID_360::ReportDescriptor,sizeof(HID_360::ReportDescriptor));
79 *descriptor=buffer;
80 return kIOReturnSuccess;
81}
82
83// Handles a message from the userspace IOHIDDeviceInterface122::setReport function
84IOReturn Xbox360ControllerClass::setReport(IOMemoryDescriptor *report,IOHIDReportType reportType,IOOptionBits options)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected