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:
Michael Lotz
2007-11-17 11:38:38 +00:00
parent eaa35fb2d1
commit 5524595645
3 changed files with 11 additions and 4 deletions
@@ -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;
} }
+3 -2
View File
@@ -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)
{ {
} }
+7 -1
View File
@@ -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;
}; };