Commit Graph

30 Commits

Author SHA1 Message Date
Fredrik Modeen
327a88fbc1 fixes pointed out by Axel, and style changes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27463 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-12 18:29:16 +00:00
Fredrik Modeen
ee652e3aab reverted to 11769 and added (std::nothrow)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27452 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-12 14:06:56 +00:00
Fredrik Modeen
c1d9a877a4 Fixed CID 1031: removed check _fDevice for NULL as we do new BList in constructor also removed temp var count as _fDevice->CountItems() should return 0 if empty
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27438 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-12 07:07:00 +00:00
Ryan Leavengood
4239ee5d66 Fixed CID 1290 and 1291: the temp BString is initialized with a new BString and then immediately replaced. A later null check ensures it is OK to initialize it to NULL.
Also fixed a GCC warning about comparison between signed and unsigned.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27434 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-12 06:21:34 +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
Fredrik Modeen
6ecf7db5fd Code cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27172 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-23 11:16:40 +00:00
Axel Dörfler
8f38768e65 * Don't define DEBUG in public headers!!! Doing it this way will break the
build for others, namely those that also include <Debug.h>
* This fixes the remaining problems of building Pe under Haiku.
* Those files need a giant style cleanup... Fredrik, time to have a look at
  our style guide :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26931 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-11 16:45:26 +00:00
Fredrik Modeen
b555dcbd39 comment fix and fixed some return error from BeBook
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26784 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 05:45:52 +00:00
François Revol
34f723cdc8 gcc4 fix. my->beers--;
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26769 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-03 19:43:59 +00:00
Fredrik Modeen
19143948df Forgot a file
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26765 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-03 18:25:08 +00:00
Fredrik Modeen
a14895cc90 Read's the joystick description file
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26764 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-03 18:22:21 +00:00
Jérôme Duval
631d09ac07 gcc4 build fix
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25866 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-08 16:32:07 +00:00
Fredrik Modeen
1ac8a0b5cb Added some part from BSerialPort and some missing things R5 Joystick Pref app reports as missing, with this R5 Joystick Pref App starts in Haiku
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25864 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-08 15:42:29 +00:00
François Revol
85e1e2f4d6 Coding style :P
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24892 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 18:05:00 +00:00
François Revol
42fe011d2a Set close-on-exec flag on USB Kit device descriptors, so apps launched by Tracker won't inherit all the fds to hubs as they do on Zeta :)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24891 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-10 16:46:26 +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
Jérôme Duval
3f990ca3cc now links with be
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17932 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-27 09:24:57 +00:00
Ingo Weinhold
338b8dc301 Merged changes from branch build_system_redesign at revision 14573.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14574 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-29 16:27:43 +00:00
Jérôme Duval
1831c12069 added libdevice.so
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13183 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-16 18:13:40 +00:00
Stefano Ceccherini
bdd5913945 Small cleanup, added a comment to some obscure code
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9898 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-10 12:43:06 +00:00
Jérôme Duval
e5602d65fe added a link in develop/lib
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8202 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-27 22:40:01 +00:00
Stefano Ceccherini
8af87c1dcc Ok, last time (at least for today). 0 is a valid fd number
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7222 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-16 10:32:59 +00:00
Stefano Ceccherini
7d60c514f8 Last famous words... Corrected some issues pointed out by Axel
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7221 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-16 08:39:12 +00:00
Stefano Ceccherini
2e90a0fca0 Finally BSerialPort works !!
- Fixed I/O Error issue
- switched from sprintf to snprintf where appropriate
- added O_EXCL flag to open()
- added many TODO items (mostly for further investigation, the class should be complete)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7220 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-16 06:24:59 +00:00
Ingo Weinhold
6ab18748f3 Removed invocations of UsePublicHeaders, which was a no-op anyway.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3628 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-23 16:53:22 +00:00
Stefano Ceccherini
d376996084 Added doxygen style comments. Fixed a bug in open() return value. The class still doesn't work as it should.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2526 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-21 19:34:45 +00:00
Stefano Ceccherini
7cf3b2f4b1 Documented the class, some small changes
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2348 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-02 13:01:45 +00:00
beveloper
27a24b9f61 BSerialPort, not very much tested. Written by Jack Burton.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2225 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-12-11 22:01:42 +00:00
beveloper
2e54c16421 start with libdevice.so
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@694 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-11 00:32:58 +00:00