Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 02 Aug 2008 21:06:27 -0400
From:      Chuck Robey <chuckr@telenix.org>
To:        FreeBSD USB List <FreeBSD-usb@FreeBSD.org>
Subject:   handling a uhid device
Message-ID:  <48950493.6050407@telenix.org>

next in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[if I don't get an answer here in 2 days, I'll be reposting to hackers, probably]

I have been taking a terribly long time figuring out the Xorg code, so that I
can start coding the Xorg Xinput tablet input device driver (for FreeBSD) which
I'm tackling.  I finished all of the Xorg research, which means I know about 85%
of the stuff for the Xorg side of the house, however, I need one question
answered as far as FreeBSD's uhid driver is concerned.

As far as my uhid code goes, after I do the configuration (which is about 75%
FreeBSD lib code, but the libusbhid driver, I can't get it to totally work, so I
wrote some custom workaround code for parts I couldn't get to work, and they
test 100% good.   I'm not sure, really, if it's my _my_ problem or FreeBSD's
problem on the libusbhid code, and I've made enough screwups so that I won't
make assumptions here on other's work.

Anyhow, I have gotten to the point in Xorg Xinput code where I'm handling the
reading (completely after all of the configuration, and separate from the
parsing, separate from the USB descriptor code too).  The Xorg code manages the
uhid input like a regular serial line, including being able to use signals to
tell of there's input waiting on the uhid for a read() to pick up (it doesn't
just block like my simple test code does).  My *question* is, is the mechanics
of the uhid driver, as it relates to reading the input, just like a regular
serial tty line, so one could use signals to see if a read()'s going to block or
not?

If it's like I expect it would be, that's really good news for me.  If it's not,
I gotta write a lot of special code for it.  The test situation I'm in isn't the
best, so I thought I would ask, instead of trying to write code to test this
(I'm not all that good at such code, it would take me a good while to be sure of
it).  If you could answer me, I sure would appreciate it, really.

Am I being clear in my question?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkiVBJMACgkQz62J6PPcoOkhvACfWrLWZKVuIDkGDIu/O2zdl2RQ
9RQAnjf+sGtf8ms7GmcCsJwogsgGzbWM
=Bvf9
-----END PGP SIGNATURE-----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48950493.6050407>