Support for USB devices in PureBasic?
-
- New User
- Posts: 7
- Joined: Sat Sep 05, 2009 11:08 pm
Support for USB devices in PureBasic?
Hello all, I'm considering PureBasic for a cross-platform software project (Windows/Linux), but I could not find information as to whether PureBasic supports communication with USB devices (other than mouse, keyboard, game controllers) out of the box, i.e. without the use of OS APIs. In my case, it's a self-developed USB device using the USB HID standard for sending data to the PC. Are there commands in PureBasic to access such a device directly? I assume I could achieve that via Windows/Linux APIs, but it would be nicer and easier to have platform-independent code.
Re: Support for USB devices in PureBasic?
I don't believe it's in the documentation, but if you try a search you might find something suitable.
Here's an old thread from 2010-2017
viewtopic.php?t=41729
Here's an old thread from 2010-2017
viewtopic.php?t=41729
Re: Support for USB devices in PureBasic?
Or this:
viewtopic.php?t=71931
Both links found with this:
https://duckduckgo.com/?q=hid+usb+site% ... ish&ia=web
viewtopic.php?t=71931
Both links found with this:
https://duckduckgo.com/?q=hid+usb+site% ... ish&ia=web
-
- New User
- Posts: 7
- Joined: Sat Sep 05, 2009 11:08 pm
Re: Support for USB devices in PureBasic?
Thank you, I meanwhile also found that Russian HID library. However, it seems to be Windows only. I had hoped for something that would fully encapsulate the OS API calls, allowing us to use the same code on all platforms.
- Kwai chang caine
- Always Here
- Posts: 5342
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
Re: Support for USB devices in PureBasic?
Native library will be great and very very usefull...today all is usb
Thanks for the links Tenaja
Thanks for the links Tenaja
The happiness is a road...
Not a destination
Not a destination
-
- Addict
- Posts: 1443
- Joined: Wed Nov 12, 2008 5:01 pm
- Location: Russia
Re: Support for USB devices in PureBasic?
The USB HID API is available on Windows only. On Linux and MacOS X need use libudev.laserjones wrote:I assume I could achieve that via Windows/Linux APIs
-
- New User
- Posts: 7
- Joined: Sat Sep 05, 2009 11:08 pm
Re: Support for USB devices in PureBasic?
But nevertheless, Linux supports many HID devices (such as mice and keyboards) out of the box, so there should be a way to access HID devices via OS calls on Linux, too. We would need USB-READ() and USB-WRITE() functions in PB that hide these OS-specific aspects from the user.User_Russian wrote:The USB HID API is available on Windows only. On Linux and MacOS X need use libudev.laserjones wrote:I assume I could achieve that via Windows/Linux APIs