From: Михаил Слюсарев on
Hi there.

All I have found about the subject is this link
http://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/devicedrivers.html

Are there any articles, books or something. Perhaps someone can share
experience about
how to start writing such things. Or all that remains for me is to
read sources?
From: Andrew Reilly on
On Thu, 25 Mar 2010 06:56:54 -0700, Михаил Слюсарев wrote:

> Hi there.
>
> All I have found about the subject is this link
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/
devicedrivers.html
>
> Are there any articles, books or something. Perhaps someone can share
> experience about
> how to start writing such things. Or all that remains for me is to read
> sources?

Reading the source could help.

Also, posting to the appropriate mailing lists may get some useful
answers, but even there it is extremely likely that you will be asked for
more information about what it is that you would like to attempt to do.

Is it even necessary to write a whole device driver, or can you use the
functionality of the existing ugen (generic USB) device driver to control
your USB device from a normal user-space program?

Cheers,

--
Andrew
From: Patrick Lamaizière on
Михаил Слюсарев :

> All I have found about the subject is this link
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/devicedrivers.html
>
> Are there any articles, books or something. Perhaps someone can share
> experience about

You will find few papers here :
http://forums.freebsd.org/showthread.php?t=1566

> how to start writing such things. Or all that remains for me is to
> read sources?

You will need to read the sources IMO
"The kernel cross reference" is very useful for this :
http://fxr.watson.org/

You can ask the freebsd-usb, freebsd-driver mailing lists too and you
may use the libusb(3) for a driver in userland.

HTH, Regards.
From: Mike Scott on
Patrick Lamaizière wrote:
....
> You can ask the freebsd-usb, freebsd-driver mailing lists too and you
> may use the libusb(3) for a driver in userland.

Bearing in mind libusb is in the ports and said there to be 'beta'
quality. (http://www.freebsd.org/cgi/url.cgi?ports/devel/libusb/pkg-descr)


--
Mike Scott (unet2 <at> [deletethis] scottsonline.org.uk)
Harlow Essex England
From: Warren Block on
Mike Scott <usenet.12(a)spam.stopper.scottsonline.org.uk> wrote:
> Patrick Lamaizière wrote:
> ...
>> You can ask the freebsd-usb, freebsd-driver mailing lists too and you
>> may use the libusb(3) for a driver in userland.
>
> Bearing in mind libusb is in the ports and said there to be 'beta'
> quality. (http://www.freebsd.org/cgi/url.cgi?ports/devel/libusb/pkg-descr)

With the new USB system in FreeBSD 8, libusb is part of the OS.

devel/libusb/Makefile:
..if ${OSVERSION} >= 800069
IGNORE= has been already included into base system
..endif

--
Warren Block * Rapid City, South Dakota * USA