Store the polling interval in the InterruptPipe class to make it accessible to the controller.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22936 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -383,7 +383,7 @@ Device::SetConfigurationAt(uint8 index)
|
|||||||
pipe = new(std::nothrow) InterruptPipe(this, fDeviceAddress,
|
pipe = new(std::nothrow) InterruptPipe(this, fDeviceAddress,
|
||||||
endpoint->descr->endpoint_address & 0x0f,
|
endpoint->descr->endpoint_address & 0x0f,
|
||||||
(endpoint->descr->endpoint_address & 0x80) > 0 ? Pipe::In : Pipe::Out,
|
(endpoint->descr->endpoint_address & 0x80) > 0 ? Pipe::In : Pipe::Out,
|
||||||
fSpeed, endpoint->descr->max_packet_size);
|
fSpeed, endpoint->descr->max_packet_size, endpoint->descr->interval);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -102,9 +102,10 @@ Pipe::GetStatus(uint16 *status)
|
|||||||
|
|
||||||
InterruptPipe::InterruptPipe(Object *parent, int8 deviceAddress,
|
InterruptPipe::InterruptPipe(Object *parent, int8 deviceAddress,
|
||||||
uint8 endpointAddress, pipeDirection direction, usb_speed speed,
|
uint8 endpointAddress, pipeDirection direction, usb_speed speed,
|
||||||
size_t maxPacketSize)
|
size_t maxPacketSize, uint8 interval)
|
||||||
: Pipe(parent, deviceAddress, endpointAddress, direction, speed,
|
: Pipe(parent, deviceAddress, endpointAddress, direction, speed,
|
||||||
maxPacketSize)
|
maxPacketSize),
|
||||||
|
fInterval(interval)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -333,7 +333,8 @@ public:
|
|||||||
uint8 endpointAddress,
|
uint8 endpointAddress,
|
||||||
pipeDirection direction,
|
pipeDirection direction,
|
||||||
usb_speed speed,
|
usb_speed speed,
|
||||||
size_t maxPacketSize);
|
size_t maxPacketSize,
|
||||||
|
uint8 interval);
|
||||||
|
|
||||||
virtual uint32 Type() { return USB_OBJECT_PIPE | USB_OBJECT_INTERRUPT_PIPE; };
|
virtual uint32 Type() { return USB_OBJECT_PIPE | USB_OBJECT_INTERRUPT_PIPE; };
|
||||||
|
|
||||||
@@ -341,6 +342,11 @@ virtual uint32 Type() { return USB_OBJECT_PIPE | USB_OBJECT_INTERRUPT_PIPE
|
|||||||
size_t dataLength,
|
size_t dataLength,
|
||||||
usb_callback_func callback,
|
usb_callback_func callback,
|
||||||
void *callbackCookie);
|
void *callbackCookie);
|
||||||
|
|
||||||
|
uint8 Interval() { return fInterval; };
|
||||||
|
|
||||||
|
private:
|
||||||
|
uint8 fInterval;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user