bfoz / libhid Goto Github PK
View Code? Open in Web Editor NEWCross platform Human Interface Device API
Home Page: http://bfoz.github.com/libhid/
Cross platform Human Interface Device API
Home Page: http://bfoz.github.com/libhid/
It sould be mentioned, in my opinion, that the library has to be included into the .pro file using SUBDIRS keyword. Using, for example, include (libhid/libhid.pri) does not work. In case of the previous example SUBDIRS += libhid should be used.
The README states, you have to enter
git add submodule git://github.com/bfoz/libhid.git *path*
to integrate libhid into the current Git repository. While doing that, I discovered that two commands were interchanged. It shall be
git submodule add git://github.com/bfoz/libhid.git *path*
instead.
I need to write data like this to activate DualShock3 controller:
uint8_t dataBlob[] = { 0x42, 0x0C, 0x00, 0x00};
IOHIDDeviceSetReport(device, kIOHIDReportTypeFeature, 0xF4, dataBlob, sizeof(dataBlob));
If I use hid_write, it will use the first byte of the data buffer as the report_id (0xF4 in this example), and when report_id != 0 it will also send this byte in the data, because of
static int set_report(...)
...
if (report_id == 0x0) {
/* Not using numbered Reports.
Don't send the report number. */
data_to_send = data+1;
length_to_send = length-1;
}
...
I don't know much about HID communication but it seems I can't send the above message with libhid in its current state. Am I missing something ?
Replace the line
HID::filter:And filters;
with
HID::filter::And filters;
and
HID::device_list devices = HID:find(&filters);
with
HID::device_list devices = HID::find(&filters);
Device::HID::*
Started, but never finished. So finish it already.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.