Commit Graph

6 Commits

Author SHA1 Message Date
Stefano Ceccherini
2d214dbbcb Fixed wrong check
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31608 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-16 19:51:58 +00:00
Ithamar R. Adema
8c339050ac Complete my previous fix :$
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29281 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-22 12:58:24 +00:00
Ithamar R. Adema
3a367aec99 Fix problem in BUSBInterface::OtherDescriptorAt(). It will now correctly return available
non-standard descriptors. This makes listusb useful again with usb audio & video devices...



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29275 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-21 20:50:08 +00:00
Michael Lotz
89dda28052 * Extend the usb_raw interface by alternate interface aware getters for
interfaces, endpoints and generic descriptors.
* Add getter for active interface index and simplify the count operation as
  it isn't misused to also get interface descriptors anymore.
* Refactor out some common code into helper functions.
* Adapt the USBKit to the changed/new interface.
* Change how alternate interfaces are exposed by USBKit by providing normal
  BUSBInterface objects for alternate interfaces that can easily be examined
  and used.
* Make BUSBInterface class aware of its alternate index and use the alternate
  aware usb_raw functionallity to build the endpoint and descriptor lists.
* Add ActiveAlternateIndex() to find out what alternate is currently active.
* Style cleanup of the USBKit classes, use std::nothrow everywhere and check
  all allocations. Simplify some code by removing optimization where the benefit
  is questionable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27409 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-10 21:52:32 +00:00
Michael Lotz
bfbbfedc5f * Prepare usb_raw.h for eventually being made public. Prefixed enums values
with B_USB_* and the command union is now usb_raw_command.
* Changed usb_raw and the BUSB* classes accordingly.
* Moved the raw_device struct into usb_raw.cpp as suggested by Francois as it
  was the only thing usb_raw_private.h defined.
* Removed usb_raw_private.h again because of the above.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24861 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-08 07:53:43 +00:00
Michael Lotz
d419b482ad Integrate the USBKit into libdevice and make it public. I left the USBKit.h
name, as it in fact is like a kit in the kit. It combines the different BUSB*
classes as compared to SerialPort.h where there really is a 1:1 relationship
between the header and the (one) class. If someone has a better fitting name
please shout.
Separated the usb_raw.h into usb_raw.h which defines the protocol and
usb_raw_private.h which holds the internal device structure for usb_raw. This
reduces the header dependencies.
Hopefully cought all occurencies of USBKit.a usage (in usb_dev_info and
the usb_webcam media add-on) but might have missed something that is not in
the image.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24858 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-07 19:24:16 +00:00