writing usb drivers under 8.x

Jim Bryant kc5vdj.freebsd at gmail.com
Fri Aug 27 08:53:42 UTC 2010


it'll be a pair of character devices.

the imon vfd is oem'ed to virtually EVERY high-end vfd-equipped htpc 
case on the market, all such tend to have the remote control interface 
as well built into the unit.  the difference exists with the 
knob/button, some have it, others don't.  the knob/button uses interrupt 
packets like the remote, but a totally different kind of packet, and i 
don't see support for it in lirc, so, i'll probably integrate it into 
the vfd device as the only read, and leave the remote as a seperate 100% 
lirc device.   if people want to tie the knob/button to the volume/mute 
function exclusively, they can do so outside of the lirc framework.  
imho, the knob/button has better use as a function selector associated 
with menus on the vfd, although it can be used for volume/mute with 
little modification to existing lirc-related code.

another possibility would be to use a function in the vfd driver to 
switch it between the vfd device for discrete use, or to switch it to 
the /dev/lirc device and have it link directly to the lirc codes for the 
remote for the volume up/down/mute buttons, with the capability to 
switch it back with another call to the /dev/vfd device.  this is the 
direction i'm leaning.  since the vfd panel, knob/button, and 
lirc-compat remote are all going to be in this driver, it's kind of a 
no-brainer.  the option to use the knob/button for either should be left 
to the end-user/programmer.  most people would rather use a remote 
control for volume/mute anyway.

although there is very rudimentary support in linux under LCDd for the 
imon vfd, i'm thinking about not going that route.  the end product may 
not end up being lcdproc /dev/lcd compat.  it has limitations i don't 
like, and it wouldn't take advantage of the features the imon has.

lirc compat is a goal of this project though.  most of the work is done 
on that front, i just need to port that over from linux.  the features 
of the imon remote control are well-supported in lirc.  /dev/lirc will 
exist in my driver.

Hans Petter Selasky wrote:
> On Thursday 26 August 2010 23:29:35 Jim Bryant wrote:
>   
>> Actually, all of my test programs (for testing my reverse engineering
>> efforts) have been done in libusb-1.0.
>>
>> I would actually like to write kernel-level drivers though for these.
>>
>>     
>
> Then you should look at existing drivers in /sys/dev/usb/xxx, which match your 
> device class. What kind of API do you want to userspace? tty-device, character 
> device?
>
> --HPS
>
>   


More information about the freebsd-usb mailing list