[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
when source code isn't enough
i've been finding some kernel source code extremely lacking in comments.
i'm trying to figure out how usb keyboards work, meaning i'm going back to
input.c (written by same person).
in input.c,
/*
* Event types
*/
#define EV_RST 0x00
#define EV_KEY 0x01
#define EV_REL 0x02
#define EV_ABS 0x03
#define EV_LED 0x11
#define EV_SND 0x12
#define EV_REP 0x14
#define EV_MAX 0x1f
it's not clear to me what all these events mean. this is more of a meta
question than a specific one -- are there resources out there that try to
document stuff like this? a "google" or "yahoo" for kernel programming?
also, i'm wondering if !! is a double negation or something about C which
i've never learned:
#define input_report_key(a,b,c) input_event(a, EV_KEY, b, !!(c))
if it's a double negation, what possible purpose could it serve?
thanks!
pete
--
"Coffee... I've conquered the Borg on coffee!" p@dirac.org
-- Kathryn Janeway on the virtues of coffee www.dirac.org/p
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/
IRC Channel: irc.openprojects.net / #kernelnewbies
Web Page: http://www.surriel.com/kernelnewbies.shtml