Re: Recommendations for programming HID in FreeBSD 9

2012-06-04 Thread Alexander Motin
On 06/04/12 01:29, Engineering wrote: if (id != 0) copyin(ugd->ugd_data,&id, 1); error = uhid_set_report(sc, ugd->ugd_report_type, id, NULL, ugd->ugd_data, imin(ugd->ugd_maxlen, size)); Hans is right. That code should do t

RE: Recommendations for programming HID in FreeBSD 9

2012-06-03 Thread Engineering
>> if (id != 0) >>copyin(ugd->ugd_data,&id, 1); >> error = uhid_set_report(sc, ugd->ugd_report_type, id, >> NULL, ugd->ugd_data, imin(ugd->ugd_maxlen, size)); > >Hans is right. That code should do the trick. Last year I've fixed

Re: Recommendations for programming HID in FreeBSD 9

2012-06-01 Thread Alexander Motin
Hi. On 06/01/12 20:10, Engineering wrote: -Original Message- From: Hans Petter Selasky [mailto:hsela...@c2i.net] I think mav @ did some work in that area? Are you sure you cannot use: ... if (id != 0) copyin(ugd->ugd_data,&id, 1); error

RE: Recommendations for programming HID in FreeBSD 9

2012-06-01 Thread Engineering
-Original Message- >From: Hans Petter Selasky [mailto:hsela...@c2i.net] > >I think mav @ did some work in that area? > >Are you sure you cannot use: >... > if (id != 0) > copyin(ugd->ugd_data, &id, 1); >error = uhid_set_report(sc, ugd->ugd_rep

Re: Recommendations for programming HID in FreeBSD 9

2012-06-01 Thread Hans Petter Selasky
On Friday 01 June 2012 18:12:20 Engineering wrote: > From: Hans Petter Selasky [mailto:hsela...@c2i.net] > > >> uhid is not going to get obsoleted, though using libraries from > > user-space is sometimes more convenient. > > Thanks HPS (and Xiaofan) > > I definitely agree with that, but I've go

RE: Recommendations for programming HID in FreeBSD 9

2012-06-01 Thread Engineering
From: Hans Petter Selasky [mailto:hsela...@c2i.net] >> uhid is not going to get obsoleted, though using libraries from user-space is sometimes more convenient. Thanks HPS (and Xiaofan) I definitely agree with that, but I've got legacy code... Last question - I've updated my code to convert the

Re: Recommendations for programming HID in FreeBSD 9

2012-06-01 Thread Hans Petter Selasky
On Friday 01 June 2012 15:45:40 Engineering wrote: > [original post moved to end for brevity - or should I just delete it when > replying?] > > Or is uhid being obsoleted? > uhid is not going to get obsoleted, though using libraries from user-space is sometimes more convenient. --HPS _

Re: Recommendations for programming HID in FreeBSD 9

2012-06-01 Thread Xiaofan Chen
On Fri, Jun 1, 2012 at 9:45 PM, Engineering wrote: > I had been researching libusb for a while, but their webpage says it is not > recommended for HID devices and to use HIDAPI, which does not seem to be on > BSD. HIDAPI does work under FreeBSD using libusb (1.0 API) as the backend. https://gith

RE: Recommendations for programming HID in FreeBSD 9

2012-06-01 Thread Engineering
[original post moved to end for brevity - or should I just delete it when replying?] From: Hans Petter Selasky [mailto:hsela...@c2i.net] >See: >man usbhid > >Else use LibUSB to access the device. > >--HPS Thank you for replying I should point out that the usbhid.cpp compile below is my file -

Re: Recommendations for programming HID in FreeBSD 9

2012-06-01 Thread Hans Petter Selasky
On Thursday 31 May 2012 18:30:56 Engineering wrote: > Hi all, I hope this is the right place to ask this > > I am in process of migrating an embedded system from BSD 7.0 to 9.0, as we > need upgraded video card drivers which will not compile on the old system. > To confuse matters a bit, I believe

Recommendations for programming HID in FreeBSD 9

2012-05-31 Thread Engineering
Hi all, I hope this is the right place to ask this I am in process of migrating an embedded system from BSD 7.0 to 9.0, as we need upgraded video card drivers which will not compile on the old system. To confuse matters a bit, I believe it was 7.0 with some of HPS updated USB stack worked in. The